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.ArrayList;
import java.util.List;
import java.util.Scanner;


public class Solution {

	private static int res;
	private static int[] numberOfPrimeDivisor;

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		
		int[] plainNumber = new int [n];
		for(int i=0;i<plainNumber.length;i++){
			plainNumber[i] = i+1;
		}
		plainNumber[0] = -1;
		getNumbers(plainNumber);
		numberOfPrimeDivisor = new int [ n ];
		int count = 0;
		for(int i=0;i<n;i++){
			int a = getNumberOfPrimeDivisors(i+1);
			if(a==2){
				count++;
			}
		}
		
		
	
		System.out.println(count);
		
		
		
		
		
	}

	private static int getNumberOfPrimeDivisors(int i) {
		
			List<Integer> factors = primeFactors(i);
			int count = 1;
			for(int j=1;j<factors.size();j++){
				if(factors.get(j)!=factors.get(j-1)){
					count++;
				}
			}
			
			return count;
		
	}

	
	  public static List<Integer> primeFactors(int number) {
		    int n = number;
		    List<Integer> factors = new ArrayList<Integer>();
		    for (int i = 2; i <= n; i++) {
		      while (n % i == 0) {
		        factors.add(i);
		        n /= i;
		      }
		    }
		    return factors;
		  }
	  
	private static void getNumbers(int[] plainNumber) {
		for(int i =2;i<plainNumber.length+1;i++){
			int a =2;
			while(a*i<plainNumber.length){
				plainNumber[a*i-1] = -1;
				a++;
			}
		}
		
		
	}

	

}
