n = int(eval(input()))

int_list = []

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

    num = 0

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

        if i % j == 0:

            num += 1

    if num == 8:

        int_list.append(i)

print((len(int_list)))
import sys

n = int(eval(input()))

if n <= 3:

    print((3))

    sys.exit()

def check(a):

    sqrt = round(a ** 0.5 + 0.5)

    factors = {1, a}

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

        if not a % i:

            if not i in factors:

                factors.add(i)

            j = a // i

            if not j in factors:

                factors.add(j)

    return len(factors)

ans = 0

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

    if check(i) == 8:

        ans += 1

print(ans)
n = int(eval(input()))
int_list = []
for i in range(1, n + 1, 2):
    num = 0
    for j in range(1, i + 1):
        if i % j == 0:
            num += 1
    if num == 8:
        int_list.append(i)
print((len(int_list)))

import sys

n = int(eval(input()))
if n <= 3:
    print((3))
    sys.exit()


def check(a):
    sqrt = round(a**0.5 + 0.5)
    factors = {1, a}
    for i in range(2, sqrt + 1):
        if not a % i:
            if not i in factors:
                factors.add(i)
            j = a // i
            if not j in factors:
                factors.add(j)
    return len(factors)


ans = 0
for i in range(3, n + 1, 2):
    if check(i) == 8:
        ans += 1
print(ans)

+import sys + -int_list = [] -for i in range(1, n + 1, 2): -    num = 0 -    for j in range(1, i + 1): -        if i % j == 0: -            num += 1 -    if num == 8: -        int_list.append(i) -print((len(int_list))) +if n <= 3: +    print((3)) +    sys.exit() + + +def check(a): +    sqrt = round(a**0.5 + 0.5) +    factors = {1, a} +    for i in range(2, sqrt + 1): +        if not a % i: +            if not i in factors: +                factors.add(i) +            j = a // i +            if not j in factors: +                factors.add(j) +    return len(factors) + + +ans = 0 +for i in range(3, n + 1, 2): +    if check(i) == 8: +        ans += 1 +print(ans)