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 MAIN{

    private static final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

    public static void main(String[] args) throws Exception{

        int n = Integer.parseInt(reader.readLine());
        int almostPrimeCount = 0;

        for(int x=2; x<=n; ++x){

            int current = x;

            boolean[] flags = new boolean[55];
            boolean primeflag = false;

            while (current%2 == 0){
                flags[2] = true;
                current /= 2;
            }
            for(int i=3; i*i <= current; i+=2){
                while (current%i == 0){
                    flags[i] = true;
                    current /= i;
                }
            }
            if(current > 2){
                primeflag = true;
            }

            int count = 0;
            for(int i=0;i<flags.length;++i){
                if(flags[i]) ++count;
            }
            if(count+(primeflag?1:0) == 2){
                ++ almostPrimeCount;
            }
        }

        System.out.println(almostPrimeCount);

    }

    private static class Pair{
        int first;
        int second;
        public Pair(int first, int second) {
            this.first = first;
            this.second = second;
        }
    }

    private static List<List<Integer>> getCombinations(int[] a, int count){
        List<List<Integer>> ret = new ArrayList<>(0);
        if(a == null || a.length > 64 || count <= 0 || count > a.length){
            return null;
        } else {
            long lim = (1L<<a.length);
            for(long i=0;i<lim;++i){
                List<Integer> poss = getBitPositionList(i);
                if(poss.size() == count){
                    List<Integer> list = new ArrayList<>(0);
                    for(int j=0;j< poss.size();++j){
                        list.add(a[poss.get(j)]);
                    }
                    ret.add(list);
                }
            }
        }
        return ret;

    }

    private static int getBitCount(long n){
        int onCount = 0;
        for(long i=0L;i<64L;++i){
            if((n&(1L<<i)) != 0){
                ++onCount;
            }
        }
        return onCount;
    }
    private static List<Integer> getBitPositionList(long n){
        List<Integer> idxs = new ArrayList<>(0);
        for(long i=0L;i<64L;++i){
            if((n&(1L<<i)) != 0){
                idxs.add(((int) i));
            }
        }
        return idxs;
    }
    private static Pair getIrreducibleFraction(int x, int y){
        int min = (x <= y) ? x : y;
        for(int i=2; i<=min; ++i){
            while (x%i==0 && y%i==0){
                x = x/i;
                y = y/i;
            }
        }
        return new Pair(x,y);
    }

    private static int getDigitSumInBase(int n, int b){
        int sum = 0;
        while (true){
            sum += n%b;
            n = n/b;
            if(n==0){
                break;
            }
        }
        return sum;
    }

    private static List<Integer> getSegmentedPrimes(int start, int end){

        List<Integer> ret = new ArrayList<>(0);
        List<Integer> primes = getPrimes(((int) Math.ceil(Math.sqrt(end))));

        boolean[] flags = new boolean[(end-start+1)+1];
        for(int i=0; i< flags.length; ++i){
            flags[i] = true;
        }
        for(int i=0;i< primes.size();++i){
            int lLim = (start / primes.get(i)) * primes.get(i);
            while (lLim< start) {
                lLim += primes.get(i);
            }
            for (int j = lLim; j <= end; j += primes.get(i)){
                flags[j- start] = false;
            }
        }
        for(int i = start; i<= end; ++i){
            if(flags[i- start]){
                ret.add(i);
            }
        }

        return ret;

    }
    private static List<Integer> getPrimes(int n){

        List<Integer> primes = new ArrayList<>(0);

        boolean[] flags = new boolean[n+1];
        for(int i=0; i<flags.length; ++i){
            flags[i] = true;
        }
        flags[0] = false;
        flags[1] = false;

        for(int i=2;i*i<=n;++i){
            if(flags[i]){
                for(int j = i*i; j <= n; j += i){
                    flags[j] = false;
                }
            }
        }

        for(int i=0, len = n+1; i < len; ++i){
            if(flags[i]){
                primes.add(i);
            }
        }

        return primes;
    }
    private static boolean isPrime(int n){
        if(n<=1){
            return false;
        } else if(n==2){
            return true;
        } else {
            for(int i=2;i<n;++i){
                if(n%i == 0){
                    return false;
                }
            }
        }
        return true;
    }

    private static void displayArray(int[] A, String header){
        System.out.println(header);
        for (int i=0;i<A.length; ++i){
            System.out.println(A[i]);
        }
    }
    private static void displayList(List<Integer> L, String header){
        System.out.println(header);
        for (int i=0;i<L.size(); ++i){
            System.out.println(L.get(i));
        }
    }

}