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.*;
import java.util.HashSet;
import java.util.Set;

public class AlmostPrimes {

    private static final InputStream INPUT = System.in;
    private static final OutputStream OUTPUT = System.out;

    private static Set<Integer> getPrimes(int n) {
        Set<Integer> result = new HashSet<>();
        int[] markers = new int[n - 1];
        int i = 2;
        while (i <= n) {
            while (i <= n && markers[i - 2] == 1) {
                i++;
            }
            if (i <= n) {
                result.add(i);
                for (int j = 2 * i; j <= n; j += i) {
                    markers[j - 2] = 1;
                }
                i++;
            }
        }
        return result;
    }

    private static int countAlmostPrimes(int n) {
        if (n == 1) {
            return 0;
        }

        Set<Integer> primes = getPrimes(n / 2);
        int count = 0;
        for (int i = 6; i <= n; i++) {
            Set<Integer> dividers = new HashSet<>();
            for (Integer d : primes) {
                if (i % d == 0) {
                    dividers.add(d);
                }
            }
            if (dividers.size() == 2) {
                count++;
            }
        }
        return count;
    }

    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(INPUT));
        int n = Integer.parseInt(reader.readLine());

        PrintWriter writer = new PrintWriter(OUTPUT);
        writer.println(countAlmostPrimes(n));
        writer.close();
    }
}
