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 A26 {
    static boolean[] composite;
    static int[] primes;

    static void initPrimes(int MAXN) {
        int sqrtN = (int)Math.sqrt(MAXN);
        composite = new boolean[MAXN];
        composite[0] = composite[1] = true;
        for (int p=2; p<=sqrtN; p++) {
            if (!composite[p]) {
                for (int x=2*p; x<MAXN; x+=p) {
                    composite[x] = true;
                }
            }
        }
        int primeNo = 0;
        for (boolean b : composite) {
            if (!b) primeNo++;
        }
        primes = new int[primeNo];
        primeNo = 0;
        for (int p=2; p<MAXN; p++) {
            if (!composite[p]) {
                primes[primeNo++] = p;
            }
        }
    }

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int N = input.nextInt();
        initPrimes(3000);
        int[] count = new int[N+1];
        for (int p : primes) {
            for (int x=p; x<=N; x+=p) {
                count[x]++;
            }
        }
        int answer = 0;
        for (int value : count) {
            if (value == 2) {
                answer++;
            }
        }
        System.out.println(answer);
    }

}
