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.Scanner;
public class Main{
  static boolean isPrime(long n){
    if(n < 2){
      return false;
    }
    else if(n == 2 || n == 3){
      return true;
    }
    else if(n %2 == 0 || n %3 == 0){
      return false;
    }
    long sqrtN = (long)Math.sqrt(n)+1;
    for(long i = 6L; i <= sqrtN; i += 6){
      if(n%(i-1) == 0 || n%(i+1) == 0){
        return false;
      }
    }
    return true;
  }
  static boolean almostPrime(long n, int tempc){
    long half = n/2;
    for(long i = 2; i <= half; i++){
      if(n %i == 0 && isPrime(i)){
        tempc++;
      }
    }
    if(isPrime(n)){
      tempc++; 
    }
    if(tempc == 2){
      return true;
    }
    return false;
  }
  public static void main(String args[]){
    Scanner sc = new Scanner (System.in);
    long num = sc.nextLong();
    int count = 0;
    int tempc = 0;
    for(long i=6; i <= num; i++){
      tempc = 0;
      if(almostPrime(i, tempc)){
        count++;
      }
    }
    System.out.println(count);
  }
}