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
# To change this template, choose Tools | Templates
# and open the template in the editor.
__author__="yaroslav"
__date__ ="$02.08.2011 18:00:13$"
import math

def resheto(num):
    arr = []
    for i in range(1,num):
        arr.append(i+1)

    for i in range(0,num/2):
        if arr[i]>0:
            for j in range(arr[i]-2,num-1,arr[i]):
                if arr[j]>0:
                    arr[j]=0
                elif arr[j]==0:
                    arr[j]=-1
                else:
                    arr[j]=-2

            x = 1
            while math.pow(i+2,x)<=num:
                arr[int(math.pow(i+2,x))-2]=-2
                #print i+2,math.pow(i+2,x)
                x+=1

    #print arr
    arr2 = []
    for i in range(0,num-1):
        if arr[i]==0 or arr[i]==-1:
            arr2.append(i+2)
    #print arr2

    return len(arr2)

if __name__ == "__main__":
    num = int(raw_input())
    if num<6: print '0'
    else: print resheto(num)