n=int(eval(input()))

x=0

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

    if j%2==0:

        continue

    m=0

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

        if j%i==0:

            m+=1

    if m==8:

        x+=1

print(x)

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()))

if n<105:

    print((0))

    exit()

ans=1

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

    if i%2==0:

        continue

    l=make_divisors(i)

    if len(l)==8:

        ans+=1

print(ans)

n = int(eval(input()))
x = 0
for j in range(1, n + 1):
    if j % 2 == 0:
        continue
    m = 0
    for i in range(1, j + 1):
        if j % i == 0:
            m += 1
    if m == 8:
        x += 1
print(x)

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()))
if n < 105:
    print((0))
    exit()
ans = 1
for i in range(106, n + 1):
    if i % 2 == 0:
        continue
    l = make_divisors(i)
    if len(l) == 8:
        ans += 1
print(ans)

+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 + + -x = 0 -for j in range(1, n + 1): -    if j % 2 == 0: +if n < 105: +    print((0)) +    exit() +ans = 1 +for i in range(106, n + 1): +    if i % 2 == 0: -    m = 0 -    for i in range(1, j + 1): -        if j % i == 0: -            m += 1 -    if m == 8: -        x += 1 -print(x) +    l = make_divisors(i) +    if len(l) == 8: +        ans += 1 +print(ans)