def getprim(n):
N = 1000000+10
prime, isp = [], [1]*N
for i in range(2, n+1):
if isp[i]: prime.append(i)
j = 0
while i * prime[j] <= n:
isp[i * prime[j]] = 0
if i % prime[j] == 0: break
j+=1
return len(prime)
n = int(input())
print(getprim(n))