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
def prime(n):
    if n<6:
        print(0)
        return
    if n<10:
        print(1)
        return
    arr = list(range(2, n + 1))
    brr=[0]*len(arr)
    count=0
    for i in range(len(arr)):
        p=arr[i]
        if p==False:
            continue
        for j in range(p*p,n+1,p):
            arr[j-2]=False
            brr[j-2]=j
    for i in range(len(brr)):
        if brr[i]!=0:
            c=set()
            d=brr[i]
            for j in arr:
                if j!=False:
                    while d%j==0:
                        d=d//j
                        c.add(j)
                    if len(c)==2 and d==1:
                        count+=1
                        break
    print(count)

prime(int(input()))