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.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;

/**
 * @author Samuel
 */
public class Main {

	/**
	 * @param args
	 * @throws IOException
	 * @throws NumberFormatException
	 */
	public static void main(String[] args) throws NumberFormatException,
			IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(in.readLine());
		ArrayList<Integer> primes = new ArrayList<Integer>();
		primes.add(2);

		// final int MAX = 3000;

		boolean isPrime;
		for (int i = 3; i <= n / 2; i += 2) {
			isPrime = true;
			for (int j = 1, len = primes.size(); j < len; j++) {
				if (i % primes.get(j) == 0) {
					isPrime = false;
					break;
				}
			}
			if (isPrime)
				primes.add(i);
		}

		int num1, comb, total = 0, num2;
		// Set<Integer> set = new HashSet<Integer>();

		int prime, num, distinctPrimeFact;
		boolean isFactor;
		for (int i = 1; i <= n; i++) {
			distinctPrimeFact = 0;
			num = i;
			for (int j = 0, len = primes.size(); j < len && num > 1; j++) {
				prime = primes.get(j);
				isFactor = false;
				while (num % prime == 0) {
					isFactor = true;
					num = num / prime;
				}
				if (isFactor)
					distinctPrimeFact++;
			}
			if(distinctPrimeFact == 2) total++;
			
		}
		
//		for (int i = 0, len = primes.size(); i < len; i++) {
//			num1 = primes.get(i);
//			if (num1 * num1 > n)
//				break;
//			for (; num1 <= n; num1 *= num1) {
//				for (int j = i + 1; j < len; j++) {
//					num2 = primes.get(j);
//					if (num1 * num2 > n)
//						break;
//					comb = num1 * num2;
//					while (comb <= n) {
//						total++;
//						num2 *= num2;
//						comb = num1 * num2;
//					}
//
//					// for (comb = num1 * num2; comb <= n; comb = comb * num2) {
//					// if(set.add(comb))
//					// total++;
//					// }
//				}
//			}
//		}
		System.out.println(total);
	}

}
