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]



ans=0



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

  if i % 2 == 1:

    l=make_divisors(i)

    if len(l)==8:

      ans+=1



print(ans)
n=int(eval(input()))



def count_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 len(lower_divisors + upper_divisors[::-1])





ans=0

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

    if i%2==1:

        c=count_divisors(i)

        if c==8:

            ans+=1

            #print(i)

print(ans)
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]


ans = 0
for i in range(1, n + 1):
    if i % 2 == 1:
        l = make_divisors(i)
        if len(l) == 8:
            ans += 1
print(ans)

n = int(eval(input()))


def count_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 len(lower_divisors + upper_divisors[::-1])


ans = 0
for i in range(1, n + 1):
    if i % 2 == 1:
        c = count_divisors(i)
        if c == 8:
            ans += 1
            # print(i)
print(ans)

-def make_divisors(n): +def count_divisors(n): -    return lower_divisors + upper_divisors[::-1] +    return len(lower_divisors + upper_divisors[::-1]) -        l = make_divisors(i) -        if len(l) == 8: +        c = count_divisors(i) +        if c == 8: +            # print(i)