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.HashSet;

/**
 * User: hornswf
 * Date: 3/17/12
 * Time: 10:16 AM
 */
public class AlmostPrime {

    //the set looks like this, because 53^p p>1 is still exists in a 3000 bound, but 57^p where p>1 doesn't
    //and all primes bigger than 53 with power of one are checked in prelast line in hasOnlyTwoPrimFactors method
    static int[] primes = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53};


    static boolean hasOnlyTwoPrimeFactors(int number){
        //the hint is to describe a number as its factorised value = a_1^p_1 * a_2 ^ p^2 * ... a_n^p_n where a_n - prime numbers
        // and p_n - natural numbers
        HashSet factors = new HashSet();

        for (int i = 0;i < primes.length && primes[i] * primes[i] < number; i++){
            while(number % primes[i] ==0){
                factors.add(primes[i]);
                if (factors.size() > 2) return false;
                number /= primes[i];
            }
        }
        if (number != 1) factors.add(number);
        return factors.size() == 2;
    }

    public static void main(String[] arg) throws IOException {
        BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
        
        int value = Integer.parseInt(r.readLine());

        //there's no needed values that're less than 6
        if (value < 6){
            System.out.println(0);
            return;
        }

        int cnt = 0;
        for (int i = 6; i <= value; i++){
            if (hasOnlyTwoPrimeFactors(i)) cnt++;
        }
        System.out.println(cnt);
        
    }
}
