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;
import java.util.ArrayList;

public class AlmostPrime {
    static int[] sieve;
    public static void main(String[] args) throws NumberFormatException, IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        sieve = getSieve(n);
        int almostPrimes = 0;
        for (int i = 2; i < sieve.length; i++) {
            if (sieve[i] != 1) {
                if (nPrimes(i)) almostPrimes++;
            }
        }
        System.out.println(almostPrimes);
    }
    
    public static int[] getSieve(int n) {
        int[] sieve = new int[n + 1];
        for (int i = 2; i < sieve.length; i++) {
            sieve[i] = 1;
        }
        for (int i = 2; i <= (int) Math.sqrt(n); i++) {
            if (sieve[i] == 1)
                for (int j = i; i * j <= n; j++) {
                    sieve[i * j] = i;
                }
        }
        return sieve;
    }
    
    public static boolean nPrimes(int i) {
        ArrayList<Integer> fact = new ArrayList<>();
        return nPrimes(i, fact);
    }
    
    public static boolean nPrimes(int i, ArrayList<Integer> fact) {
        if (i < 2 && fact.size() == 2) return true;
        else if (i < 2 || fact.size() > 2) return false;
        int actPrime = sieve[i];
        int newNum = i / sieve[i];
        if (actPrime == 1) {
            newNum = 1;
            actPrime = i;
        }
        if (fact.indexOf(actPrime) == -1 && actPrime != 1) fact.add(actPrime);
        return nPrimes(newNum, fact);
    }
}
