def shai(n):
prim = list()
check = list([1] * (n + 1))
for i in range(2, n + 1):
if(check[i] == 1):
prim.append(i)
print(i)
for j in prim:
if(j * i > n):
break
check[j * i] = 0
if(i % j == 0):
break
return prim
N = int(input("N: "))
PRIM = shai(N)
total = len(PRIM)
print("Total:", total)