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
p = [2,]

def prime():
    for i in range(3,3000):
        isprime = True
        for pp in p:
            if i % pp == 0:
                isprime = False
                break
        if isprime:
            p.append(i)
    #print p

def almost_primie(p1, p2, n):
    if p1 > p2:
        p1,p2=p2,p1
    ans = []
    root = int(math.log(n,p1))
    if root < 2:
        return ans
    ans = [p1**e * p2**ee
           for e in range(1,root)
           for ee in range(1, root - e + 1)
           if p1**e * p2**ee <=n]
    #if p1==41 and p2==43:
    #    print 'xxxxxx', ans
    return ans

def main(n):
    ans = []
    pn = 0
    import pdb
    #pdb.set_trace()
    for i in range(0, len(p)):
        if p[i] <= n/2 :
            pn = i
        else:
            break
    #for i in range(0, pn):
    #    for j in range(i+1, pn+1):
    #        if p[i]*p[j]<=n:
    #            ans += almost_primie(p[i], p[j], n) or []
    #
    #print len(ans)
    #return
    ans =[]
    
    for i in range(6, n+1):
        fac = set()
        ii = i
        while ii >1:
            for pp in p:
                if ii % pp == 0:
                    fac.add(pp)
                    ii /= pp
        #print i,fac
        if len(fac)==2:
            ans.append(i)
    print len(ans)
    return
    print sorted(ans)

    print ans2 - set(ans)
    print set(ans) - ans2
if __name__ == '__main__':
    prime()
    n = int(raw_input())
    main(n)
