import sys

input = lambda: sys.stdin.readline().rstrip()

N = int(eval(input()))

ans = 0

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

    yaku = 0

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

        if i%j==0:

            yaku += 1

    if yaku == 8:

        ans += 1

print(ans)

import sys

input = lambda: sys.stdin.readline().rstrip()

N = int(eval(input()))

ans = 0

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

    yaku = 0

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

        if n%i==0:

            yaku += 1

    if yaku == 8:

        ans += 1

print(ans)

import sys

input = lambda: sys.stdin.readline().rstrip()
N = int(eval(input()))
ans = 0
for i in range(1, N + 1, 2):
    yaku = 0
    for j in range(1, i + 1):
        if i % j == 0:
            yaku += 1
    if yaku == 8:
        ans += 1
print(ans)

import sys

input = lambda: sys.stdin.readline().rstrip()
N = int(eval(input()))
ans = 0
for n in range(1, N + 1, 2):
    yaku = 0
    for i in range(1, n + 1):
        if n % i == 0:
            yaku += 1
    if yaku == 8:
        ans += 1
print(ans)

-for i in range(1, N + 1, 2): +for n in range(1, N + 1, 2): -    for j in range(1, i + 1): -        if i % j == 0: +    for i in range(1, n + 1): +        if n % i == 0: