prime=[True]*1000000

np=[0]*1000000

for i in range(2,1000000):

    if prime[i]:

        for j in range(i*2,1000000,i):

            prime[j]=False

    np[i]=np[i-1]+prime[i]



while True:

    try:

        n=int(eval(input()))

    except:

        break

    print((np[n]))
prime=[True]*1000000

np=[0]*1000000

for i in range(2,1000):

    if prime[i]:

        for j in range(i*2,1000000,i):

            prime[j]=False



while True:

    try:

        n=int(eval(input()))

    except:

        break

    print((sum(prime[2:n+1])))
prime = [True] * 1000000
np = [0] * 1000000
for i in range(2, 1000000):
    if prime[i]:
        for j in range(i * 2, 1000000, i):
            prime[j] = False
    np[i] = np[i - 1] + prime[i]
while True:
    try:
        n = int(eval(input()))
    except:
        break
    print((np[n]))

prime = [True] * 1000000
np = [0] * 1000000
for i in range(2, 1000):
    if prime[i]:
        for j in range(i * 2, 1000000, i):
            prime[j] = False
while True:
    try:
        n = int(eval(input()))
    except:
        break
    print((sum(prime[2 : n + 1])))

-for i in range(2, 1000000): +for i in range(2, 1000): -    np[i] = np[i - 1] + prime[i] -    print((np[n])) +    print((sum(prime[2 : n + 1])))