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 P1 {
	private static final Scanner IN = new Scanner(System.in);
	private static final int TOT = 3000;
	private static final boolean primos[] = new boolean[TOT+1];
	
	private static final void fillCriba(){
		primos[0]=true;
		primos[1]=true;
		int tope = (int)Math.sqrt(TOT)+1;
		for (int i = 2; i <= tope; i++) {
			if(isPrimo(i)){
				if((i*i)>=TOT) return;
				for (int j = i; j <= (TOT/2)+1; j++) {
					if (j*i > TOT) break;
					primos[j*i]=true;
				}
			}
		}
	}
	
	public static void main(String[] args) {
		fillCriba();
		int c = 0;
		int n = IN.nextInt(); 
		for (int i = 6; i <= n; i++) {
			if(isAlmost(i)) c++;
		}
		System.out.println(c);
	}
	
	private static boolean isAlmost(int n){
		int c = 0;
		for (int i = 2; i < n; i++) {
			if (c>2) return false;
			if(n%i==0)
				if(isPrimo(i)) c++;
		}
		return c==2;
	}
	
	private static boolean isPrimo(int n){
		return !primos[n];
	}
}