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
x = 100004
hmap = {}
def sieve(x):
    if x < 2:
        return 0
    primes = [1] * (x + 1)
    
    primes[0] = primes[1] = 0
    spf = [-1] * (100004 + 1)
    
    i = 2
    # iterating only over the squareroot of N
    while(i * i <= x):
        # in sieve we consider first non cut number to be prime
        if primes[i]: 
            j = i
            while(i * j <= x):
                if primes[i * j] == 1:
                    spf[i * j] = i
                    primes[i * j] = 0
                j += 1
        i += 1
    return spf

spfArray = sieve(x)
def primeFactors(n):
    # we have to create sieve only once according to the contraints
    # here in this example spf array for 10 will look like
    # [-1, -1, -1, -1, 2, -1, 2, -1, 2, 3, 2]
    # according to condition spfArray[10] = 2 (which is not equal to -1)
    # therefore while loop will run 
    # and we will print spf[10] which is 2 
    # and we will divide n by spf[10] which is 10 / 2 => 5
    # now again while loop condition will check spf[5] != -1
    # but here spf[5] is -1 (beacuse it is a prime number)
    # therefore we will not go into while loop 
    # now if condition n != -1
    # here n is 5 so we will print n => 5 these are the factors of 10
    while(spfArray[n] != -1):
        if spfArray[n] in hmap:
            hmap[spfArray[n]] += 1
        else:
            hmap[spfArray[n]] = 1
        n //= spfArray[n]
    if n != 1:
        if n in hmap:
            hmap[n] += 1
        else:
            hmap[n] = 1
    
    
    if len(hmap) == 2:
        return True
    else:
        return False
        


q = int(input())
count = 0
for i in range(2, q + 1):
    res = primeFactors(i)
    if res:
        count += 1
    hmap.clear()
print(count)