n = int(eval(input()))



counter = 0  



for i in range(1, n+1):

  if i%2!=0 and len([j for j in range(1,i+1) if i%j==0])==8:

    counter += 1

    

print(counter)
n = int(eval(input()))

ans = 0



for i in range(1, n+1, 2):

  counter = 0

  for j in range(1, i+1):

    if i%j==0:

      counter += 1

    if counter > 8:

      break

  if counter == 8:

    ans += 1

    

print(ans)
n = int(eval(input()))
counter = 0
for i in range(1, n + 1):
    if i % 2 != 0 and len([j for j in range(1, i + 1) if i % j == 0]) == 8:
        counter += 1
print(counter)

n = int(eval(input()))
ans = 0
for i in range(1, n + 1, 2):
    counter = 0
    for j in range(1, i + 1):
        if i % j == 0:
            counter += 1
        if counter > 8:
            break
    if counter == 8:
        ans += 1
print(ans)

-counter = 0 -for i in range(1, n + 1): -    if i % 2 != 0 and len([j for j in range(1, i + 1) if i % j == 0]) == 8: -        counter += 1 -print(counter) +ans = 0 +for i in range(1, n + 1, 2): +    counter = 0 +    for j in range(1, i + 1): +        if i % j == 0: +            counter += 1 +        if counter > 8: +            break +    if counter == 8: +        ans += 1 +print(ans)