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 Prime_Factorization_using_Sieve
{
    static final int max=100001;
    static int spf[]=new int[max];
static void sieve()
{
    spf[1]=1;
    for(int i=2;i<max;i++)
    spf[i]=i;

    for(int i=4;i<max;i+=2)
    {
        spf[i]=2;
    }
    for(int i=3;i*i<max;i++)
    {
        // checking if i is prime 
        if(spf[i]==i)
        {
            for(int j=i*i;j<max;j+=i)
            {
                if(spf[j]==j)
                spf[j]=i;
            }
        }
    }
}

static boolean  getFactorization(int x)
{
    Set<Integer> factor=new HashSet<>();
    while(x!=1)
    {
        factor.add(spf[x]);
        x/=spf[x];
    }
        if(factor.size()==2)
        return true;
    return false;
}
    public static void main(String [] args)
    {
        sieve();
        Scanner sc=new Scanner(System.in);
        int x=sc.nextInt();
        int count=0;
        for(int i=1;i<=x;i++)
        {
            if(getFactorization(i))
            count++;
        }
        System.out.println(count);
       
    }
}