N = int(eval(input()))

ans = 0

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

    cnt = 0

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

        if i % j == 0:

            cnt += 1

    if cnt == 8:

        ans += 1



print(ans)
import sys

input = lambda: sys.stdin.readline().rstrip("\r\n")



n = int(eval(input()))



def num_divisors_table(n):

    table = [0] * (n + 1)

    

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

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

            table[j] += 1

    

    return table



table = num_divisors_table(n)

ans = 0

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

    if table[i] == 8:

        ans += 1

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

import sys

input = lambda: sys.stdin.readline().rstrip("\r\n")
n = int(eval(input()))


def num_divisors_table(n):
    table = [0] * (n + 1)
    for i in range(1, n + 1):
        for j in range(i, n + 1, i):
            table[j] += 1
    return table


table = num_divisors_table(n)
ans = 0
for i in range(1, n + 1, 2):
    if table[i] == 8:
        ans += 1
print(ans)

-N = int(eval(input())) +import sys + +input = lambda: sys.stdin.readline().rstrip("\r\n") +n = int(eval(input())) + + +def num_divisors_table(n): +    table = [0] * (n + 1) +    for i in range(1, n + 1): +        for j in range(i, n + 1, i): +            table[j] += 1 +    return table + + +table = num_divisors_table(n) -for i in range(1, N + 1, 2): -    cnt = 0 -    for j in range(1, N + 1): -        if i % j == 0: -            cnt += 1 -    if cnt == 8: +for i in range(1, n + 1, 2): +    if table[i] == 8: