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 sys
from itertools import ifilter

primes=[0]*3001
primes[0]=1
primes[1]=1
for i in xrange(2,3001):
    if primes[i]==0:
        for j in xrange(i*2, 3001, i):
            primes[j]=1

def c(n):
    cnt=0
    for p, t in enumerate(primes):
        if t==1: continue
        if p > n/2+1:
            break
        if n%p==0:
            cnt+=1
        if cnt>2:
            return False
    return cnt==2

n=int(sys.stdin.readline())
print sum(c(x) for x in xrange(6,n+1))
