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

public class AlmostPrime {

    private static final boolean DEBUG = false;

    private static final int MAX = 4000;
    private static final int[] cnts = new int[MAX];
    private static final Integer[][] div = new Integer[MAX][3];
    private static final Boolean[] isPrime = new Boolean[MAX];
    static {
        isPrime[0] = false;
        isPrime[1] = false;
        for ( int i = 2; i < MAX; ++i ) {
            if ( isPrime[i] == null ) {
                isPrime[i] = true;
                div[i][0] = i;
                int k = 2;
                while ( k*i < MAX ) {
                    isPrime[k*i] = false;
                    div[k*i][0] = i;
                    merge(k*i, k);
                    ++k;
                }
            }
        }
        
        cnts[0] = 0;
        for ( int i = 1; i < MAX; ++i ) {
            cnts[i] = cnts[i-1] + (div[i][1] !=null && div[i][2] == null ? 1 : 0);
        }
    }

    private static final void merge( int b, int s ) {
        if (DEBUG) System.out.printf("b=%d, s=%d\n", b, s);
        Set<Integer> set = new TreeSet<Integer>();
        for ( int i = 0; i < 3; ++i ) {
            if ( div[b][i] != null ) set.add( div[b][i] );
            if ( div[s][i] != null ) set.add( div[s][i] );
        }
        if (DEBUG) System.out.printf("set.size=%d\n", set.size());
        Iterator<Integer> iter = set.iterator();
        for ( int i = 0; i < 3; ++i ) {
            if ( iter.hasNext() ) div[b][i] = iter.next();
        }
    }

    public static void main( String[] args ) throws Exception {
        if (DEBUG)
            for ( int i = 0; i < 100; ++i ) {
                System.out.printf("%2d: %d %d %d\n", i, div[i][0], div[i][1], div[i][2]);
            }
        BufferedReader br = new BufferedReader( new InputStreamReader( System.in ) );
        int n = Integer.parseInt(br.readLine());
        System.out.println( cnts[n] );
    }

}