import math

N = int(eval(input()))

ans = 0

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

    P = set([1,m])

    for k in range(2,math.floor(math.sqrt(m))+1):

        if m % k == 0:

            P.add(k)

            P.add(m//k)

    if len(P) == 8:

        ans += 1

print(ans)

import math

N = int(eval(input()))

def yakusuu(N):

    P = [1,N]

    for k in range(2,math.floor(math.sqrt(N))+1):

        if N % k == 0:

            P.append(k)

            P.append(N//k)

    return len(set(P))

ans = 0

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

    if yakusuu(k) == 8:

        ans += 1

print(ans)

import math

N = int(eval(input()))
ans = 0
for m in range(1, N + 1, 2):
    P = set([1, m])
    for k in range(2, math.floor(math.sqrt(m)) + 1):
        if m % k == 0:
            P.add(k)
            P.add(m // k)
    if len(P) == 8:
        ans += 1
print(ans)

import math

N = int(eval(input()))


def yakusuu(N):
    P = [1, N]
    for k in range(2, math.floor(math.sqrt(N)) + 1):
        if N % k == 0:
            P.append(k)
            P.append(N // k)
    return len(set(P))


ans = 0
for k in range(1, N + 1, 2):
    if yakusuu(k) == 8:
        ans += 1
print(ans)

+ + +def yakusuu(N): +    P = [1, N] +    for k in range(2, math.floor(math.sqrt(N)) + 1): +        if N % k == 0: +            P.append(k) +            P.append(N // k) +    return len(set(P)) + + -for m in range(1, N + 1, 2): -    P = set([1, m]) -    for k in range(2, math.floor(math.sqrt(m)) + 1): -        if m % k == 0: -            P.add(k) -            P.add(m // k) -    if len(P) == 8: +for k in range(1, N + 1, 2): +    if yakusuu(k) == 8: