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 {
    
    static List<Integer> l = new ArrayList<Integer>();
    static Set<Integer> s = new HashSet<Integer>();
    // Few numbers can have more than two distinct prime divisors
    // This set will capture them
    static Set<Integer> e = new HashSet<Integer>();
    
    static void sieve(int n){
        boolean[] prime = new boolean[(n/2) + 1];
        Arrays.fill(prime, true);
        prime[0] = false;
        if(prime.length>1){
            prime[1] = false;
            int m = (int) Math.sqrt(n);
            for (int i = 2; i <= m; i++)
            if (prime[i])
              for (int k = i * i; k <= (n/2); k += i)
                prime[k] = false;
            for(int i=0; i<=n/2; i++) if(prime[i] && (i<=n/2)) l.add(i);
        }
    }
    
    static void almostPrime(int n){
        int count = 0; boolean end = false;
        for(int k=1; k<=n; k++){
            for(int i=0; i<l.size();i++){
                int a = l.get(i); int b=0;
                for(int j=i+1; j<l.size();j++){
                    b = l.get(j);
                    if(((k%a)==0)&&((k%b)==0)) {
                        if(!s.contains(k))s.add(k);
                        else e.add(k);
                    }
                    else if((a*b)>k) break;
                }
            }
        }
        s.removeAll(e);
        System.out.println(s.size());
    }
    
    
    static void solve(){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        sieve(n);
        almostPrime(n);
    }
    
    public static void main(String args[]) {
        solve();
    }
}