def make_divisors(n):

    divisors = []

    for i in range(1, int(n ** 0.5) + 1):

        if n % i == 0:

            divisors.append(i)

            if i != n // i:

                divisors.append(n // i)



    # divisors.sort()

    return divisors



N = int(eval(input()))



count = 0

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

    # print(len(make_divisors(i)), make_divisors(i))

    if i % 2 == 1 and len(make_divisors(i)) == 8:

        count += 1



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



def make_divisors(n):

    lower_divisors, upper_divisors = [], []

    i = 1

    while i * i <= n:

        if n % i == 0:

            lower_divisors.append(i)

            if i != n // i:

                upper_divisors.append(n // i)

        i += 1

    return lower_divisors + upper_divisors[::-1]



count = 0

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

    # print(i, len(make_divisors(i)))

    if i % 2 == 1 and len(make_divisors(i)) == 8:

        count += 1

print(count)
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5) + 1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n // i)
    # divisors.sort()
    return divisors


N = int(eval(input()))
count = 0
for i in range(1, N + 1):
    # print(len(make_divisors(i)), make_divisors(i))
    if i % 2 == 1 and len(make_divisors(i)) == 8:
        count += 1
print(count)

N = int(eval(input()))


def make_divisors(n):
    lower_divisors, upper_divisors = [], []
    i = 1
    while i * i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n // i)
        i += 1
    return lower_divisors + upper_divisors[::-1]


count = 0
for i in range(1, N + 1):
    # print(i, len(make_divisors(i)))
    if i % 2 == 1 and len(make_divisors(i)) == 8:
        count += 1
print(count)

-def make_divisors(n): -    divisors = [] -    for i in range(1, int(n**0.5) + 1): -        if n % i == 0: -            divisors.append(i) -            if i != n // i: -                divisors.append(n // i) -    # divisors.sort() -    return divisors +N = int(eval(input())) -N = int(eval(input())) +def make_divisors(n): +    lower_divisors, upper_divisors = [], [] +    i = 1 +    while i * i <= n: +        if n % i == 0: +            lower_divisors.append(i) +            if i != n // i: +                upper_divisors.append(n // i) +        i += 1 +    return lower_divisors + upper_divisors[::-1] + + -    # print(len(make_divisors(i)), make_divisors(i)) +    # print(i, len(make_divisors(i)))