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

public class A26 {
	private static boolean isPrimes[] = primeSieve(3000);
	public static void main(String[] args) throws IOException {
		solveAlmostPrime();
	}
	
	public static void solveAlmostPrime()throws IOException{
		Scanner scan = new Scanner(new BufferedInputStream(System.in));
		int N = scan.nextInt();
		
		int result = 0;
		for (int i = 5; i <= N; i++) {
			int x = i;
			int div = 0;
			for (int j = 2; j <= N; j++) {
				if(isPrimes[j] && x%j == 0){
					div++;
					while(x%j == 0)
						x = x /j;
				}
			}
			if(div == 2)
				result++;
		}
		System.out.println(result);
	}
	
	private static boolean[] primeSieve(int N) {

        // initially assume all integers are prime
        boolean[] isPrime = new boolean[N + 1];
        for (int i = 2; i <= N; i++) {
            isPrime[i] = true;
        }

       
        // mark non-primes <= N using Sieve of Eratosthenes
        for (int i = 2; i*i <= N; i++) {

            // if i is prime, then mark multiples of i as nonprime
            // suffices to consider mutiples i, i+1, ..., N/i
            if (isPrime[i]) {
                for (int j = i; i*j <= N; j++) {
                    isPrime[i*j] = false;
                }
            }
        }

        return isPrime;
	}
}
