n = int(eval(input()))

dp = [1]*(n + 1)

ans = 0

# エラストテネスの箒

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

    div = 1

    while i * div <= n:

        dp[i * div] += 1

        div += 1

# dp[1]から１個飛ばしで表示

print((dp[1::2].count(8)))
n = int(eval(input()))

cnt = 0

lista = [0] * (n + 1)

# 奇数のみ

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

    # 3 * 1, 3 * 3, 3 * 5...

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

        lista[j] += 1

for i in range(n + 1):

    if lista[i] == 8:

        cnt += 1

print(cnt)

n = int(eval(input()))
dp = [1] * (n + 1)
ans = 0
# エラストテネスの箒
for i in range(2, n + 1):
    div = 1
    while i * div <= n:
        dp[i * div] += 1
        div += 1
# dp[1]から１個飛ばしで表示
print((dp[1::2].count(8)))

n = int(eval(input()))
cnt = 0
lista = [0] * (n + 1)
# 奇数のみ
for i in range(1, n + 1, 2):
    # 3 * 1, 3 * 3, 3 * 5...
    for j in range(i, n + 1, 2 * i):
        lista[j] += 1
for i in range(n + 1):
    if lista[i] == 8:
        cnt += 1
print(cnt)

-dp = [1] * (n + 1) -ans = 0 -# エラストテネスの箒 -for i in range(2, n + 1): -    div = 1 -    while i * div <= n: -        dp[i * div] += 1 -        div += 1 -# dp[1]から１個飛ばしで表示 -print((dp[1::2].count(8))) +cnt = 0 +lista = [0] * (n + 1) +# 奇数のみ +for i in range(1, n + 1, 2): +    # 3 * 1, 3 * 3, 3 * 5... +    for j in range(i, n + 1, 2 * i): +        lista[j] += 1 +for i in range(n + 1): +    if lista[i] == 8: +        cnt += 1 +print(cnt)