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.*;
public class AlmostPrime_26A {

    public static Scanner in = new Scanner(System.in);
    public static List<Integer> primes;
    public static int c = 0; //c is the size of primes
    
    public static void generatePrimes(int n) { //using sieve
        //0 is prime, 1 isnt
        primes = new ArrayList<Integer>();
        int [] sieve = new int [n+1];
        int i = 2;
        while (i < n) {
            if (sieve[i] == 0) 
                for (int j = i+i; j <= n; j=j+i) 
                    sieve[j] = 1;
            i++;
        }
        for(int k = 2; k< sieve.length; k++) 
            if (sieve[k] == 0)  
                primes.add(k);
    }
    public static int almostPrimes(int n) {
        //doing exculsion--simpler?
        int [] s = new int[n+1];
        for (int i = 0; i<primes.size(); i++) 
            for (int j = 2; j<n+1; j++) 
                if (j%primes.get(i) == 0)
                    s[j]++;     
        int p = 0;
        for (int j = 0; j<n+1; j++) 
            if (s[j] == 2)
                p++;
        /*
        for (int i =0; i< primes.size() && primes.get(i) != 0 && primes.get(i)*2 <= n; i++){
            for (int k=2; Math.pow(primes.get(i), k) <= n; k++)
                p++;    //ex 2*2 = 4
        }
        p++; //for 1*1
        System.out.println(p +" " + c);
        return p+c;  */
        return p;
    }
    public static void main (String[] args) {
        int n = in.nextInt();
        generatePrimes(n);  
        System.out.println(almostPrimes(n));
    }
}
