N = int(eval(input()))



ans = 0

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

    res = 0

    for q in range(1, N + 1):

        if i % 2 != 0:

            if i % q == 0:

                res += 1

    if res == 8:

        ans += 1



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

ans = 0

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

    cnt = 0

    if n % 2 == 1:

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

            if n % i == 0:

                cnt += 1

    if cnt == 8:

        ans += 1

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

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

-for i in range(1, N + 1): -    res = 0 -    for q in range(1, N + 1): -        if i % 2 != 0: -            if i % q == 0: -                res += 1 -    if res == 8: +for n in range(1, N + 1): +    cnt = 0 +    if n % 2 == 1: +        for i in range(1, N + 1): +            if n % i == 0: +                cnt += 1 +    if cnt == 8: