import math
n=int(input())
nn=n
a=[True for i in range(0,n)]
b=2
while(b<=math.sqrt(n)):
    c=b*2
    while(c<=n):
        if(a[c-1]==True):
            nn-=1
            a[c-1]=False
        c+=b
    b+=1
print(nn-1)