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.HashSet;
import java.util.Scanner;
import java.util.Set;

/**
 *Reham Ashor
 */
public class Main
{
    public boolean isPrime(int N)
    {
        if(N<=1) return false;
        else if(N == 2) return true;
        else if(N%2 == 0) return false;
        else
        {
            for(int i=3;i<N;i=i+2)
            {
                if(N%i == 0) return false;
            }
        }
        return true;
    }
    public boolean isAlmost(int n)
    {
        Set array=new HashSet();
        int Number = (int)Math.ceil(n/2);
        for(int i=3;i<=Number;i+=2)
        {
            if(n%2 == 0) {array.add(2); n=n/2; i-=2;}
            else if(n % i == 0){array.add(i); n=n/i; i-=2;}
        }
        if(array.size() == 2) return true;
        return false;
    }
    //-----------------------------------------------------------
    public static void main(String[] args)
    {
        int Count=0;
        Scanner in = new Scanner(System.in);
        while(in.hasNext())
        {
         Count=0;
         int Num = in.nextInt();
         if(Num>5)
         {
          for(int i=5;i<=Num;i++)
          {
             if(!new Main().isPrime(i))
             {
                if (new Main().isAlmost(i))
                Count++;}
          }
         }
         System.out.println(Count);
        }
    }

}
