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.Arrays;
import java.util.Scanner;
public class KFPrimes {

    public void find_k_factors(boolean[] prime, int n){
        int[] factor_count = new int[n+1];
        Arrays.fill(factor_count,0);
        for (int i = 2; i <= n; i++) {
            if (prime[i] == true) {
                for (int j = 2*i; j <= n; j += i) {
                    //System.out.println(" i is : "+ i+" ||| j is : "+j);
                    prime[j] = false;
                    //System.out.println("Increament count of  "+ j+ " where i is : "+i);
                    factor_count[j]++;
                }
            }
        }
        int count=0;
        for(int i=0;i<=n;i++){
            if(factor_count[i]==2)
                count++;
        }
        System.out.println(count);
    }
    public static void main(final String[] args) {
        final  KFPrimes obj = new KFPrimes();
        Scanner sc = new Scanner(System.in);
        //System.out.println("Enter the n:");
        final int n = sc.nextInt();
        final boolean prime[] = new boolean[n + 1];
        Arrays.fill(prime, true);
        prime[0] = false;
        prime[1] = false;
        obj.find_k_factors(prime,n);
        sc.close();
    }
}