#coding: UTF-8



from bisect import bisect_right



max_number = 1000000

prime_flag_list = [1] * max_number



prime_flag_list[0] = 0

prime_flag_list[1] = 0



prime_flag_list[4::2] = [0] * len(prime_flag_list[4::2])



for i in range(3, int(max_number**0.5) + 1, 2):

    prime_flag_list[i*i::i] = [0] * len(prime_flag_list[i*i::i])



prime_list = [i for i in range(2, max_number) if prime_flag_list[i]]



while True:

    try:

        input = int(input())

    except EOFError:

        break

    print(bisect_right(prime_list, input))
#coding: UTF-8



from bisect import bisect_right



max_number = 1000000

prime_flag_list = [True] * max_number



prime_flag_list[0] = False

prime_flag_list[1] = False



prime_flag_list[4::2] = [False] * len(prime_flag_list[4::2])



for i in range(3, int(max_number**0.5) + 1, 2):

    prime_flag_list[i*i::i] = [False] * len(prime_flag_list[i*i::i])



prime_list = [i for i in range(2, max_number) if prime_flag_list[i]]



while True:

    try:

        input = int(input())

    except EOFError:

        break



    print(bisect_right(prime_list, input))
# coding: UTF-8
from bisect import bisect_right

max_number = 1000000
prime_flag_list = [1] * max_number
prime_flag_list[0] = 0
prime_flag_list[1] = 0
prime_flag_list[4::2] = [0] * len(prime_flag_list[4::2])
for i in range(3, int(max_number**0.5) + 1, 2):
    prime_flag_list[i * i :: i] = [0] * len(prime_flag_list[i * i :: i])
prime_list = [i for i in range(2, max_number) if prime_flag_list[i]]
while True:
    try:
        input = int(input())
    except EOFError:
        break
    print(bisect_right(prime_list, input))

# coding: UTF-8
from bisect import bisect_right

max_number = 1000000
prime_flag_list = [True] * max_number
prime_flag_list[0] = False
prime_flag_list[1] = False
prime_flag_list[4::2] = [False] * len(prime_flag_list[4::2])
for i in range(3, int(max_number**0.5) + 1, 2):
    prime_flag_list[i * i :: i] = [False] * len(prime_flag_list[i * i :: i])
prime_list = [i for i in range(2, max_number) if prime_flag_list[i]]
while True:
    try:
        input = int(input())
    except EOFError:
        break
    print(bisect_right(prime_list, input))

-prime_flag_list = [1] * max_number -prime_flag_list[0] = 0 -prime_flag_list[1] = 0 -prime_flag_list[4::2] = [0] * len(prime_flag_list[4::2]) +prime_flag_list = [True] * max_number +prime_flag_list[0] = False +prime_flag_list[1] = False +prime_flag_list[4::2] = [False] * len(prime_flag_list[4::2]) -    prime_flag_list[i * i :: i] = [0] * len(prime_flag_list[i * i :: i]) +    prime_flag_list[i * i :: i] = [False] * len(prime_flag_list[i * i :: i])