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.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;


public class AlmostPrime {
	public static void main(String[] args) throws IOException{
		BufferedReader lector = new BufferedReader(new InputStreamReader(System.in)); //lectura de la entrada
		String linea = lector.readLine(); //string de la entrada
		int n = Integer.parseInt(linea); //entero de la entrada (si lo necesitas).
		
		
		if(n <6){
			System.out.println(0);
		}else{
		
			/*Variables */
		
			boolean[] noCasiPrimo = new boolean[n];
			noCasiPrimo[0] = true;
			noCasiPrimo[1] = true;
			noCasiPrimo[2] = true;
			
			int tope = (int) n/2 +1;
			boolean[] noPrimos = new boolean[n];
			noPrimos[0] = true;
			noPrimos[1] = false;
			noPrimos[2] = false;
			
			/*Criba */
			for(int k=2; k<n; k++){
				if(!noPrimos[(k-1)]){
					for(int j=k*2; j<=n; j=j+k){
						noPrimos[(j-1)] = true;
					}	
				}
			}
			
//			//Mostrar primos
//			for(int k=1; k<=n; k++){
//				if(!noPrimos[(k-1)]){
//					System.out.print(k + " ");
//				}
//			}
			
			/*Casi Primos */
			for(int j=1; j<=n; j++){
				int contador = 0;
				int tope2 = (int) j/2 +1;
				//Encontrar factores primos
				for(int k = 2; k<=tope2; k++){
					if(!noPrimos[(k-1)] && (j%k == 0)){
						contador++;
					}
					if(contador>=3){
						break;
					}
				}
				if(contador>=3){
					for(int l=j; l<=n; l=l+j){
						noCasiPrimo[(l-1)] = true;
					}
				}else if(contador == 1){
					for(int l = j; l<=n; l = l*l){
						noCasiPrimo[(l-1)] = true;
					}
				}else if(contador == 2){
					noCasiPrimo[(j-1)] = false;
				}else if(contador == 0){
					noCasiPrimo[(j-1)] = true;
				}
			}
			
	
			//Contar casi primos
			
			
			int cantidad = 0;
			for(int k=0; k<n; k++){
				if(!noCasiPrimo[k]){
					cantidad++;
				}
			}
			System.out.println(cantidad);
		}
	}
	
	
}	
