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;

/**
 * @author artyom
 */
public class AlmostPrime2 {
    private static final short MAX_PRIME_NUMBER = 3_000;
    private static final short[] primes = new short[MAX_PRIME_NUMBER + 1];

    static {
        generatePrimes();
    }

    private static void generatePrimes() {
        for (int i = 2, n = MAX_PRIME_NUMBER / 2; i <= n; i++) {
            if (primes[i] == 0) {
                for (int j = 2 * i; j <= MAX_PRIME_NUMBER; j += i) {
                    primes[j]++;
                }
            }
        }
    }

    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        short n = sc.nextShort();
        System.out.println(calcAlmostPrimes(n));
    }

    private static short calcAlmostPrimes(short n) {
        short c = 0;
        for (int i = 2; i <= n; i++) {
            if (primes[i] == 2) {
                c++;
            }
        }
        return c;
    }
}