from math import sqrt

N = int(eval(input()))

ans = 0

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

  if i%2==0:

    continue

  c = 0

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

    if i%j==0:

      if i//j==j:

        c+=1

      else:

        c+=2

  if c==8:

    ans += 1

print(ans)
from math import sqrt

N = int(eval(input()))

ans = 0

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

  if i%2==0:

    continue

  c = 0

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

    if i%j==0:

      c+=2

  if c==8:

    ans += 1

print(ans)
from math import sqrt

N = int(eval(input()))
ans = 0
for i in range(7, N + 1):
    if i % 2 == 0:
        continue
    c = 0
    for j in range(1, int(sqrt(i)) + 1):
        if i % j == 0:
            if i // j == j:
                c += 1
            else:
                c += 2
    if c == 8:
        ans += 1
print(ans)

from math import sqrt

N = int(eval(input()))
ans = 0
for i in range(7, N + 1):
    if i % 2 == 0:
        continue
    c = 0
    for j in range(1, int(sqrt(i)) + 1):
        if i % j == 0:
            c += 2
    if c == 8:
        ans += 1
print(ans)

-            if i // j == j: -                c += 1 -            else: -                c += 2 +            c += 2