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
import java.util.Scanner;


public class Almostprime {	
	public static void main(String[] args){
	Scanner in = new Scanner(System.in);
	int primero = in.nextInt();
	in.close();
	int k = 0;
	int tamano = 0;
	int numero = 0;
	int total = 0;
	while (k < primero+1){
		if (primo(k))
			++tamano;
		++k;}
	int[] primos = new int[tamano];
	k = 0;
	int c = 0;
	while (k < primero+1){
		if (primo(k) == true){
			primos[c] = k;
			++c;}
		++k;
		}
	
	k = 0;
	while (k <= primero){
		numero = 0;
		int cont = 0;
		while (cont < tamano - 1){
			if (k%primos[cont] == 0){
			++numero;}
			++cont;}
		++k;
		if (numero == 2)
		++total;
		}
	System.out.println(total);
	}
	public static boolean primo(int n){
		if (n < 2)
			return false;
		if ((n%2) == 0){
			if (n == 2)
				return true;
			if (n != 2)
				return false;}
		int k = 2;
		while (k < n){
			int aux = n % k;
			if (aux == 0)
				return false;
			++k;}
		return true;	
	}
	
	public static int primoSiguiente(int n){
		int siguiente = n+1;
		boolean c = true;
		while (c == true){
			if (primo(siguiente))
				c = false;
			else
				++siguiente;}
		return siguiente;		
	}
}
