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
from typing import List
import math
import argparse

#O(sqrt n)

#nloglogn
#suitable for range ofnos (not for single query for single query brute force of sqrt n is better as pre processing takes lot of time)
#space complexity is issue to power 9 to 10 power 10

from typing import List
import math
import argparse

class Solution:
    def prime_factors_spf(self, n) -> int:

        f_map = {}
        self.smallest_prime_factor = [-1] * (n + 1)
        primes_or_not = [1] * (n + 1)
        smallest_prime_factor = [-1] * (n + 1)
        primes_or_not[1] = 0
        for i in range(2, int(math.sqrt(n)) + 1):
            if primes_or_not[i] == 1:
                j = i
                while i * j <= n:
                    if primes_or_not[i * j] == 1:
                        primes_or_not[i * j] = 0
                        self.smallest_prime_factor[i * j] = i
                    j += 1

        self.primes = [i for i in range(2, n + 1) if primes_or_not[i] == 1]

    def get_factors(self, n) -> int:
        factors = []
        num = n
        while self.smallest_prime_factor[num] != -1:
            factors.append((self.smallest_prime_factor[num]))
            if self.smallest_prime_factor[num] == 0:
                break
            else:
                num = int(num / self.smallest_prime_factor[num])

        if num != 1:
            factors.append(num)

        # for i in factors:
        #     f_map[i] = (f_map.get(i, 0)) + 1

        return len(set(factors))

    def count_divisors(self, arr, n):

        if len(arr) == 0: return 0
        count = 0
        for i in arr:
            if self.get_factors(i) == 2:
                count += 1

        return count


if __name__ == '__main__':
    sol = Solution()
    sol.prime_factors_spf(3000)

    n = int(input())
    arr = [i for i in range(2, n+1)]
    count = sol.count_divisors(arr, n)
    print(count)
