A number is called almost prime if it has exactly two distinct prime divisors. For example, numbers 6, 18, 24 are almost prime, while 4, 8, 9, 42 are not. Find the amount of almost prime numbers which are between 1 and n, inclusive.

Input

Input contains one integer number n (1 ≤ n ≤ 3000).

Output

Output the amount of almost prime numbers between 1 and n, inclusive.

Examples

Input

10


Output

2


Input

21


Output

8
//https://codeforces.com/problemset/problem/26/A
import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;
public class AlmostPrime
{
	public static int[] constructing_Smallest_Prime_Factor_Array(int n_max)
	{
		int[] sieve_Prime_Number_Array=new int[n_max+1];
		int[] smallest_Prime_Factor_Array=new int[n_max+1];
		sieve_Prime_Number_Array[1]=0;
		for(int i=2;i<=n_max;i++)
		{
			sieve_Prime_Number_Array[i]=1;
			smallest_Prime_Factor_Array[i]=-1;
		}
		smallest_Prime_Factor_Array[0]=-1;
		smallest_Prime_Factor_Array[1]=-1;
		
		for(int i=2;(i*i)<=n_max;i++)
		{
			if(sieve_Prime_Number_Array[i]==1)
			{
				for(int j=i;(j*i)<=n_max;j++)
				{
					sieve_Prime_Number_Array[j*i]=0;
					if(smallest_Prime_Factor_Array[j*i]==-1)
						smallest_Prime_Factor_Array[j*i]=i;
				}
			}	
		}
		
		return smallest_Prime_Factor_Array;
	}
	
	public static int calculate_Total_Number_Of_Prime_Factors(int n,int[] smallest_Prime_Factor_Array)
	{
		int frequency=0;
		int previous_Prime_Factor=-1;
		int total_Number_Of_Prime_Factors=0;
		if(n<=1)
			return 0;
		while(smallest_Prime_Factor_Array[n]!=-1)
		{
			int prime_factor=smallest_Prime_Factor_Array[n];
			if(previous_Prime_Factor!=-1)
			{
				total_Number_Of_Prime_Factors++;
			}
			frequency=0;
			while(n%prime_factor==0)
			{
				n/=prime_factor;
				frequency++;
			}
			previous_Prime_Factor=prime_factor;
		}
		if(n>1)
		{
			if(n==previous_Prime_Factor)
			{
				total_Number_Of_Prime_Factors++;
			}
			else if(previous_Prime_Factor!=-1)
			{
				total_Number_Of_Prime_Factors+=2;
			}
			else
			{
				total_Number_Of_Prime_Factors++;
			}
		}
		else
		{
			total_Number_Of_Prime_Factors++;
		}
		return total_Number_Of_Prime_Factors;
	}
	
	public static List<Integer> calculate_Numbers_Array_Of_1_To_NMax_With_2_Unique_Prime_Factors(int nmax,int[] smallest_Prime_Factor_Array)
	{
		int[] total_Number_Of_Prime_Factors_Array_Of_1_To_Nmax=new int[nmax+1];
		List<Integer> numbers_Array_Of_1_To_NMax_With_2_Unique_Prime_Factors=new ArrayList<Integer>();
		for(int number=1;number<=nmax;number++)
		{
			if(calculate_Total_Number_Of_Prime_Factors(number,smallest_Prime_Factor_Array)==2)
			{
				numbers_Array_Of_1_To_NMax_With_2_Unique_Prime_Factors.add(number);
			}
		}
		return numbers_Array_Of_1_To_NMax_With_2_Unique_Prime_Factors;
	}

	public static int[] calculate_Frequency_Of_Numbers_between_1_To_Index_With_2_Unique_Prime_Factors(int nmax,
																									  List<Integer> numbers_Array_Of_1_To_NMax_With_2_Unique_Prime_Factors)
	{
		int[] frequency_Of_Numbers_between_1_To_Index_With_2_Unique_Prime_Factors=new int[nmax+1];
		int currentfrequency=0;
		int numbers_Array_Of_1_To_NMax_With_2_Unique_Prime_Factors_Index=0;
		for(int index=1;index<=nmax;index++)
		{
			if(numbers_Array_Of_1_To_NMax_With_2_Unique_Prime_Factors_Index<numbers_Array_Of_1_To_NMax_With_2_Unique_Prime_Factors.size())
			{	
				if(index==numbers_Array_Of_1_To_NMax_With_2_Unique_Prime_Factors.get(numbers_Array_Of_1_To_NMax_With_2_Unique_Prime_Factors_Index))
				{
					currentfrequency++;
					numbers_Array_Of_1_To_NMax_With_2_Unique_Prime_Factors_Index++;
				}
			}
			frequency_Of_Numbers_between_1_To_Index_With_2_Unique_Prime_Factors[index]=currentfrequency;
		}
		return frequency_Of_Numbers_between_1_To_Index_With_2_Unique_Prime_Factors;	
	}
	
	public static void main(String[] args)
	{
		Scanner sc=new Scanner(System.in);
		int n_max=1000000;
		int[] smallest_Prime_Factor_Array=constructing_Smallest_Prime_Factor_Array(n_max);
		List<Integer> numbers_Array_Of_1_To_NMax_With_2_Unique_Prime_Factors=calculate_Numbers_Array_Of_1_To_NMax_With_2_Unique_Prime_Factors(n_max,smallest_Prime_Factor_Array);
		int[] frequency_Of_Numbers_between_1_To_Index_With_2_Unique_Prime_Factors=
																				calculate_Frequency_Of_Numbers_between_1_To_Index_With_2_Unique_Prime_Factors(
																																		n_max,numbers_Array_Of_1_To_NMax_With_2_Unique_Prime_Factors);
		
		
		System.out.println(frequency_Of_Numbers_between_1_To_Index_With_2_Unique_Prime_Factors[sc.nextInt()]);	
	}
}