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(input())
ap = 0


def prime(num):
    for i in range(2,num - 1):
        if num%i == 0:
            return False
    return True
for i in range(3,n + 1):
    d1 = False
    d2 = False
    for j in range(2,i):
        if i%j == 0 and prime(j):
            if not d1:
                d1 = True
            elif not d2:
                d2 = True
            else:
                d1 = False
                d2 = False
                break
    if d1 and d2:
        #print(i)
        ap = ap + 1
print(ap)

