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
/**
 * Alexandra Mikhaylova mikhaylova@yandex-team.ru
 */

import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Q {

    private static Set<Integer> getPrimeNumbers(int n) {
        Set<Integer> primeNumbers = new HashSet<Integer>();
        int[] markers = new int[n - 1];
        int i = 2;
        while (i <= n) {
            while (i <= n && markers[i - 2] == 1) {
                i ++;
            }
            if (i <= n) {
                primeNumbers.add(i);
                for (int j = 2 * i; j <= n; j += i) {
                    markers[j - 2] = 1;
                }
                i ++;
            }
        }
        return primeNumbers;
    }

    private static int countAlmostPrimeNumbers(int n) {
        if (n == 1) {
            return 0;
        }

        Set<Integer> primeNumbers = getPrimeNumbers(n / 2);
        int count = 0;
        for (int i = 6; i <= n; i ++) {
            Set<Integer> dividers = new HashSet<Integer>();
            for (Integer primeNumber : primeNumbers) {
                if (i % primeNumber == 0) {
                    dividers.add(primeNumber);
                }
            }
            if (dividers.size() == 2) {
                count ++;
            }
        }
        return count;
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        System.out.println(countAlmostPrimeNumbers(n));
    }
}
