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 int[] criba = {0, 1, 1, 1, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 5, 2, 3, 2, 1, 2, 1, 2, 3, 2, 5, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 7, 2, 3, 2, 1, 2, 5, 2, 3, 2, 1, 2, 1, 2, 3, 2, 5, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 7, 2, 1, 2, 3, 2, 1, 2, 5, 2, 3, 2, 1, 2, 7, 2, 3, 2, 5, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 5, 2, 3, 2, 7, 2, 11, 2, 3, 2, 5, 2, 1, 2, 3, 2, 1, 2, 7, 2, 3, 2, 1, 2, 1, 2, 3, 2, 11, 2, 5, 2, 3, 2, 1, 2, 1, 2, 3, 2, 5, 2, 1, 2, 3, 2, 7, 2, 1, 2, 3, 2, 1, 2, 13, 2, 3, 2, 1, 2, 5, 2, 3, 2, 1, 2, 1, 2, 3, 2, 5, 2, 11, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 7, 2, 5, 2, 3, 2, 11, 2, 1, 2, 3, 2, 5, 2, 7, 2, 3, 2, 13, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 5, 2, 3, 2, 1, 2, 1, 2, 3, 2, 5, 2, 13, 2, 3, 2, 1, 2, 11, 2, 3, 2, 1, 2, 7, 2, 3, 2, 1, 2, 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 2, 3, 2, 1, 2};

	
	public static int almostPrimes(int n){
		int count = 0;
		for (int i = 3; i < n + 1; i++){
			count += checkAlmostPrime(i);
		}
		return count;
	}
	
	public static int checkPrime(int i){
		int d = criba[i];
		int f = d;
		int j = i;
		while (f == d){
			j = j/f;
			f = criba[j];
		}
		return j;
	}
	
	public static int checkAlmostPrime(int i){
		int d = criba[i];
		if (d == 1)
			return 0;
		
		int p = checkPrime(i);
		if (p == d)
			return 0;
		if (criba[p] == 1){
			return 1;
		}
	
		
		int d2 = criba[p];
		int p2 = checkPrime(p);
		if (d2 != p2)
			return 0;
		return 1;
	}

	public static void main(String args[]) throws NumberFormatException, IOException{
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); 
		int n = Integer.parseInt(in.readLine());
		System.out.println(almostPrimes(n));
	}
}
