n = int(eval(input()))



ans = 0

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

  div_count = 0

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

    if i % j == 0:

      div_count += 1

  if div_count == 8:

    ans += 1



print(ans)
N = int(eval(input()))



ans = 0

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

    mod_count = 0

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

        if i % j == 0:

            mod_count += 1

    if mod_count == 8:

        ans += 1

print(ans)

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

N = int(eval(input()))
ans = 0
for i in range(1, N + 1, 2):
    mod_count = 0
    for j in range(1, i + 1):
        if i % j == 0:
            mod_count += 1
    if mod_count == 8:
        ans += 1
print(ans)

-n = int(eval(input())) +N = int(eval(input())) -for i in range(1, n + 1, 2): -    div_count = 0 +for i in range(1, N + 1, 2): +    mod_count = 0 -            div_count += 1 -    if div_count == 8: +            mod_count += 1 +    if mod_count == 8: