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 math
n = int(raw_input())
primes = [ 2 ]
for num in xrange(3,n+1):
    sqrt = math.sqrt(num)
    for prime in primes:
        add = True
        if prime > sqrt:
            break
        if num % prime == 0:
            add = False
            break
    if add: primes.append(num)

def num_primes(num):
    ret = 0
    for prime in primes:
        if num % prime == 0:
            ret += 1
        if ret >= 3: return ret
    return ret

end = 0
for num in xrange(1,n+1):
    if num_primes(num) == 2:
        end += 1
print end