import math
def is_prime(n):

    p = 2
    while p*p <= n:
        if n % p == 0:
            return False
        p += 1
    return True
c = 0
for i in range(int(input())):
    if is_prime(i): c+= 1
print(c)
