# 筛选出1-N中的质数
def get_prime(N):
prime_vals = []
flag = [True] * (N+1)
for val in range(2, N+1):
if flag[val]:
prime_vals.append(val)
for next_val in range(2*val, N+1, val):
flag[next_val] = False
return prime_vals
print(len(get_prime(int(input()))))