
def isprime(number):
    if number == 2 or 2 ** (number -1) % number == 1:
        return 1 
    else:
        return 0
def countPrime(number,count):
    if isprime(number)== 1:
        count +=1
    return count
        
n = int(input())
c = 0
for i in range(n):
    c = countPrime(i,c)
print (c)