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

def minprime(d):
    for i in xrange(2, 1 + int(math.sqrt(d))):
        if d % i is 0:
            return i
    return d

def primearr(d):
    if d is 1:
        return [1]
    ans = []
    while d > 1:
        i = minprime(d)
        ans.append(i)
        d /= i
    return list(set(ans))

def almostprime(d):
    return True if len(primearr(d)) is 2 and not primearr(d)[0] is primearr(d)[1] else False

n = int(raw_input())
ans = 0
for i in xrange(1, 1 + n):
    if almostprime(i):
        ans += 1
print ans
