peterverebics/CodeNet_Python_118 huggingface dataset:
N = int(input())

def make_divisors(n):
    from collections import deque
    divisors = deque([])
    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)
    lst_divisors = list(divisors)
    lst_divisors.sort()
    return lst_divisors

ans = 0
for i in range(1,-(-N//2)+1):
    now = 2*i-1
    if len(make_divisors(now)) == 8:
        ans += 1

print(ans)
N = int(input())
count = 0
if 105 <= N <= 106:
  count = 1
elif N < 105:
  count = 0
else:
  count = 1
  for i in range(107, N + 1, 2):
    prime_count = 0
    for j in range(1, int(i ** (1/2)) + 1):
      if i % j == 0:
        prime_count += 1
        if i / j != j:
          prime_count += 1
    if prime_count == 8:
      count += 1
print(count)
n = int(input())
ans = 0
if n < 105:
    print(0)
else:
    for i in range(1,n+1,2):
        count = 0
        for l in range(1, i+1, 2):
            if i % l == 0:
                count += 1
        if count == 8:
            ans += 1
    print(ans)
import math
def yakusuu(a):
  x=[]
  b=math.ceil(math.sqrt(a))
  for i in  range(1,b+1):
    if a%i==0:
      x.append((i,int(a/i)))
  return(x)
N=int(input())
oddlist=[i for i in range(1,N+1,2)]
ans=[]
for i in oddlist:
  x=yakusuu(i)
  if len(x)==4:
    ans.append(i)
print(len(ans))
n = int(input())

ans = 0

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

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 len(divisors)
  
ans = 0

for i in range(1,N+1):
  a = make_divisors(i)
  if a ==8 and i%2 == 1 :
    ans += 1
    
print(int(ans))
n = int(input()) 
def yakusu(num):
    list_a = []
    for i in range(1, num//2 + 1):
        if num % i == 0:
            list_a.append(i)
    list_a.append(num)
    return list_a
  
ans = 0
for i in range(1, n + 1):
    if len(yakusu(i)) == 8 and i % 2 ==1:
        ans += 1
        
print(ans)
import itertools
N = int(input())
S = [3,5,7,11,13]

if N >= 189:
  ans = 2
elif N>= 135:
  ans = 1
else:
  ans = 0
A = list(itertools.combinations(S,3))
#print(A)
for x in A:
  a,b,c = x
  if a*b*c <= N:
    ans += 1
print(ans)
N = int(input())
res = 0

for i in range(1, N+1):
  count = 0
  for j in range(1, i+1):
    if i % j == 0:
      count += 1
  if count == 8 and i % 2 != 0:
    res += 1
print(res)
N = int(input())
ans = 0
for i in range(1, N + 1):
    if i % 2 == 0:
        continue
    cnt = 2
    for j in range(2, i):
        if i % j == 0:
            cnt += 1
    if cnt == 8:
        ans += 1
print(ans)
n = int(input())

count = 0
for i in range(1,n+1):
  temp_count = 0
  if i%2 == 0:
    continue
  for j in range(1,i+1):
    if i%j == 0:
      temp_count += 1
  if temp_count == 8:
    count += 1
    
print(count)
n = int(input())
ans = 0
for i in range(105,n+1,2):
    c=0
    for d in range(1,i+1,2):
        if i % d == 0:
            c+=1
    if c == 8:
        ans += 1
print(ans)
N = int(input())

ans = 0

for i in range(1,N+1) :
    dev = 0
    if i%2 == 0 :
        continue
    for j in range(1,i+1) :
        if i%j == 0 :
            dev += 1
    if dev == 8 :
        ans += 1

print(ans)
n=int(input())
if n<105:
    print(0)
    exit()
ans=0
for i in range(105,n+1,2):
    c=0
    for j in range(1,i+1):
        if i%j==0:
            c+=1
    if c==8:
        ans+=1
print(ans)
N=int(input())
ans=0
for n in range(1,N+1,2):
    a=0
    for w in range(1,n+1,2):
        if n%w==0:
            a+=1
    if a==8:
        ans+=1
print(ans)
N=int(input())
ans=0
for i in range(1,N+1):
  count=0
  for j in range(1,i+1):
    if i%j==0:
      count+=1
  if i%2==1 and count==8:
    ans+=1
print(ans)
n=int(input())


def check(n):
    ans=0
    for i in range(1,n+1):
        if n%i==0:
            ans+=1
    if ans==8:
        return True
    return False

ans=0
for i in range(1,n+1,2):
    if check(i):
        ans+=1
print(ans)
#nの約数列挙
#-------------------------------------------------------------------------
def divisor(n):
    ass = []
    for i in range(1,int(n**0.5)+1):
        if n%i == 0:
            ass.append(i)
            ass.append(n//i)
    return ass #sortされていない
#-------------------------------------------------------------------------
# テスト
N = int(input())
cnt = 0

for i in range(N+1):
    if i%2 == 1 and len(divisor(i)) == 8:
        cnt += 1
print(cnt)
a=int(input())
if a<105:
  print(0)
if 105<=a<135:
  print(1)
if 135<=a<165:
  print(2)
if 165<=a<189:
  print(3)
if 189<=a<195:
  print(4)
if 195<=a:
  print(5)
d8 = [105, 135, 165, 189, 195]
n = int(input())
print(sum([1 for i in d8 if i <= n]))
N = int(input())
out=0
k=0
for i in range(1,N+1):
    k=0
    if i % 2==1:
        for j in range(1,i+1):
            if i % j==0:
                k = k+1
        if k==8:
            out = out+1
    
print(out)
n = int(input())
ans = 0
for i in range(1,n+1,2):
  res = 0
  for j in range(1,i+1):
    if i % j == 0:
      res +=1
    if res == 8:
      ans +=1
print(ans)
n = int(input())
ans = 0
for i in range(1,n+1,2):
    cnt = 0
    for j in range(1,i+1):
        if i%j==0:
            cnt += 1
    if cnt==8:
        ans += 1
print(ans)
n=int(input())

ans=0
for i in range(1,n+1):
    p=0
    for j in range(1,i+1):
        if i%j==0:
            p+=1
    if p==8 and j%2!=0:
        ans+=1

print(ans)
# coding: utf-8


def get_ans(num: int):
    if num < 105:
        return 0
    ans = 0
    for i in range(105, num + 1):
        if i % 2 == 0:
            continue
        if cnt_yaku(i):
            ans += 1
    return ans


def cnt_yaku(num: int):
    ans = 0
    for i in range(1, num + 1):
        if num % i == 0:
            ans += 1
    return ans == 8


num = int(input())
ans = get_ans(num)
print(ans)
import sys
input = lambda: sys.stdin.readline().rstrip("\r\n")

n = int(input())

def num_divisors_table(n):
    table = [0] * (n + 1)
    
    for i in range(1, n + 1):
        for j in range(i, n + 1, i):
            table[j] += 1
    
    return table

table = num_divisors_table(n)
ans = 0
for i in range(1, n + 1, 2):
    if table[i] == 8:
        ans += 1
print(ans)
N = int(input())

def divisors(n):
    re = 0
    for i in range(1,int(n**0.5)+1):
        if n % i == 0:
            if n == i**2:
                re += 1
            else:
                re += 2
    return re
ans = 0
for i in range(1,N+1,2):
    if divisors(i) == 8:
        ans += 1
print(ans)
import sys
input = sys.stdin.readline
N = int(input())
if N < 105 :
    print(0)
elif N >= 105 and N<135 :
    print(1)
elif N>= 135 and N<165 :
    print(2)
elif N>=165 and N<189 :
    print(3)
elif N>=189 and N<195 :
    print(4)
else :
    print(5)
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(input())
ans = 0
for i in range(1, n+1,2):
    if len(make_divisors(i)) == 8:
        ans += 1

print(ans)
n = int(input())
count = 0
sum_of_count_8 = 0
for i in range(1,n+1,2):
    count = 0
    for j in range(1,n+1):
        if i%j ==0:
            count+=1
    if count == 8:
        sum_of_count_8 += 1
print(sum_of_count_8)
def solve(n):
  cnt = 0
  for i in range(1,n+1):
    if n%i == 0: cnt += 1
  if cnt == 8: return True
  else: return False

n = int(input())
ans = 0
for i in range(1, n+1, 2):
  if solve(i): ans += 1
print(ans)
N = int(input())
cnt=0
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

for i in range(1,N+1,2):
    if(len(make_divisors(i))==8):
        cnt+=1
        
print(cnt)
n = int(input())
if n<3*5*7:
    ans=0
elif n<3**3*5:
    ans=1
elif n<3*5*11:
    ans=2
elif n<3**3*7:
    ans=3
elif n<3*5*13:
    ans=4
else:
    ans=5
print(ans)
N = int(input())
B = 0
for i in range(N):
  A = 0
  n = int((i+1)**(1/2))
  for j in range(n):
     if (i+1) % (j+1) == 0:
        A += 1
  if A == 4 and (i+1) % 2 == 1:
    B += 1
print(B)
from math import sqrt
N=int(input())
ans=0
for i in range(1,N+1,2):
  d=[]
  for j in range(1,int(sqrt(i))+1):
    if i%j==0:
      d.append(j)
      d.append(N//j)
  d=list(set(d))
  if len(d)==8:
    ans+=1
print(ans)
def yaku(n):
    A = []
    for i in range(1,int(n**0.5)+1):
        if n%i==0:
            A.append(i)
            A.append(n//i)
    return len(A)
N = int(input())
cnt = 0
for i in range(1,N+1,2):
    if yaku(i)==8:
        cnt += 1
print(cnt)
n = int(input())
result = 0
for i in range(1,n+1,2):
  total = 0
  for j in range(1,i+1):
    if (i%j == 0):
      total += 1
  if(total == 8):
    result += 1
    #print(i,j)
print(result)
n=int(input())
ans = 0
for i in range(1,n+1,2):
  cnt = 0
  for j in range(1,i+1):
    if i%j == 0:
      cnt += 1
  if cnt == 8:
    ans += 1
print(ans)
n = int(input())
 
def check(p):
  c = 0
  for i in range(1,p+1):
    if p % i == 0:
      c += 1
  return c
 
ans = 0
for i in range(1,n+1):
  if i % 2 == 1:
    if check(i) == 8:
      ans += 1
      
print(ans)
N = int(input())
ans = 0
for n in range(1,N+1,2):
    d = set()
    m = 1
    while m*m <= n:
        if n%m==0:
            d.add(m)
            d.add(n//m)
        m += 1
    if len(d)==8:
        ans += 1
print(ans)
N = int(input())
ans = 0
for i in range(1, N+1, 2):
    d = 0
    for k in range(1, i+1):
        if i % k == 0:
            d += 1
    if d == 8:
        ans += 1
print(ans)
n = int(input())
ans = 0
count = 0

for i in range(1,n+1,2):
    for j in range(1,i+1):
        if i%j == 0:
            count += 1
    if count == 8:
        ans += 1
    count = 0

print(ans)
import math
n = int(input())

def judge(num):
    count=0
    for i in range(1,num+1):
        if num%i==0:
            count+=1
    return count

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

print(ans)
N=int(input())

#https://qiita.com/LorseKudos/items/9eb560494862c8b4eb56
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):
  if i%2==1 and len(make_divisors(i))==8:
    count+=1
print(count)
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
N = int(input())
for n in range(1, N+1):
    if n%2 != 0:
        if len(make_divisors(n)) == 8:
            ans += 1

print(ans)
import math

n = int(input())

ans = 0
for i in range(1, n+1):
    if i % 2 != 0:
        prime_num = 0
        for j in range(1, n+1):
            if i % j == 0:
                prime_num += 1
        if prime_num == 8:
            ans += 1

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

def get_divisors(n):
    return [i for i in range(1, n//2+1) if n%i == 0] + [n]

ans = 0
for i in range(1, n+1, 2):
    if len(get_divisors(i)) == 8:
        ans += 1
print(ans)
N = int(input())

odd = list()

count_list = list()
count = 0

for a in range(1, N+1):
    if a % 2 != 0:
        odd.append(a)

l = len(odd)

for a in range(0, l):
    for b in range(1, odd[a]+1):
        if odd[a] % b == 0:
            count += 1
    count_list.append(count)
    count = 0

print(len(list(filter(lambda x: x == 8, count_list))))
from math import sqrt, ceil
n = int(input())
ans = 0
for i in range(1, n+1, 2):
    score = 0
    for d in range(1, ceil(sqrt(i))+1):
        p, m = divmod(i, d)
        if m == 0:
            if p != d:
                score += 2
            else:
                score += 1
    if score == 8:
        ans += 1
print(ans)
def divisor(n):
    i = 1
    table = []
    while i * i <= n:
        if n % i == 0:
            table.append(i)
            table.append(n//i)
        i += 1
    table = list(set(table))
    return table


def main():
    n = int(input())
    ans = 0
    for i in range(1, n+1):
        if i % 2 != 0 and len(divisor(i)) == 8:
            ans += 1
    print(ans)


if __name__ == "__main__":
    main()
def make_divisors(n):
    div=[]
    for i in range(1,-int(-n**0.5//1)):
        if n%i==0:
            div.append(i)
            div.append(n//i)
    if n%(n**0.5)==0:
        div.append(int(n**0.5))
    return div

n=int(input())
ans=[]
for i in range(1,n+1,2):
    if len(make_divisors(i))==8:
        ans.append(i)
print(len(ans))
from math import floor, sqrt
N = int(input())
ans = 0
for o in range(1, N + 1, 2):
  cnt = 0
  for n in range(1, o + 1):
    if o % n == 0:
      cnt += 1
  if cnt == 8:
    ans += 1
print(ans)
n=int(input())
ans=0
for i in range(1,n+1,2):
    ct=0
    for j in range(1,i+1):
        if i%j==0: ct+=1
    if ct==8: ans+=1
print(ans)
N = int(input())
ans = 0
for i in range(1, N+1):
  if i % 2 == 0:
    continue
  a = 0
  for j in range(1, i+1):
    if i % j == 0:
      a += 1
  if a == 8:
    ans += 1
print(ans)
c = 0
for i in range(1, int(input())+1):
  if not i%2:
    continue
  if sum(not(i%j) for j in range(1, i+1))==8:
    c += 1
print(c)
n = int(input())
ans = []
for i in range(1, n+1):
    cnt = 0
    if i%2==1:
        for j in range(1, i+1):
            if i%j==0:
                cnt += 1
    if cnt==8:
        ans.append(i)

print(len(ans))
n = int(input())
ans = 0
for i in range(1,n+1,2):
	cnt = 0
	for j in range(1,i+1):
		cnt += (i%j==0)
	if cnt==8: ans+=1
print(ans)
import math

n=int(input())
count,cnt=0,0

for i in range(1,n+1,2):
  for j in range(1,math.ceil(i/2)):
    if i%j==0:
      count+=1
      
  if count+1==8:
    cnt+=1
    
  count=0
  
print(cnt)
n = int(input())
ans = 0
for i in range(1, n + 1):
    if i % 2 == 1:
        cnt = 0
        for j in range(1, i + 1):
            if i % j == 0:
                cnt += 1
        if cnt == 8:
            ans += 1
print(ans)
n = int(input())
if n < 105:
  print(0)
else:
  output = 0
  for i in range(105,n+1):
    if i % 2 == 0:
      continue
    yaku = 0
    for j in range(1,i+1):
      if i % j == 0:
        yaku += 1
      if yaku > 8:
        continue
    if yaku == 8:
      output += 1
  print(output)
n = int(input())
have_8_divisors = 0

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

    # 偶数の時はスキップ
    if i % 2 == 0:
        continue
    cnt = 0
    for j in range(1, i + 1):
        if i % j == 0:
            cnt += 1

    result = cnt == 8
    if result:
        have_8_divisors += 1

print(have_8_divisors)
def divisor(n): 
    i = 1
    table = []
    while i * i <= n:
        if n % i == 0:
            table.append(i)
            table.append(n//i)
        i += 1
    table = list(set(table))
    return table

N = int(input())
total = 0

for n in range(1, N + 1, 2):
    if len(divisor(n)) == 8:
        total += 1

print(total)
n = int(input())

count = 0
for i in range(1, n+1):
    if i % 2 == 1:
        yaku = 0
        for j in range(1, i+1):
            if i % j == 0:
                yaku += 1
        if yaku == 8:
            count += 1
print(count)
n = int(input())

def divisor(n: int) -> list:
    list_of_divisor = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            list_of_divisor.append(i)
            if i != n//i:
                list_of_divisor.append(n//i)
    # list_of_divisor.sort()
    return list_of_divisor

ans = 0
for i in range(1, n+1, 2):
    li = divisor(i)
    if len(li) == 8:
        ans += 1

print(ans)
N = int(input())

ans = 0
for i in range(1, N + 1, 2):
    c = 0
    for j in range(1, i + 1):
        if i % j == 0:
            c += 1
    if c == 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)
    return divisors
n=int(input())
c=0
for i in range(1,n+1,2):
    a=make_divisors(i)
    if len(a)==8:
        c+=1
print(c)
N = int(input())

def get_divisor_num(n):
    cnt = 0
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            cnt += 1
            if n // i != i:
                cnt += 1

    return cnt

cnt = 0
for i in range(1, N+1, 2):
    if get_divisor_num(i) == 8:
        cnt += 1

print(cnt)
n = int(input())
ans = 0
for i in range(1, n+1):
  stock = 0
  for j in range(1, n+1):
    if i % j == 0:
      stock += 1
  if stock == 8 and i % 2:
    ans += 1
print(ans)
n= int(input())
ans=0
for i in range(1,n+1,2):
    cnt=0
    for j in range(1,i+1):
        if i%j==0:
            cnt+=1
    if cnt==8:
        ans+=1
print(ans)
N = int(input())
ans = 0

for n in range(1, N+1):
    cnt = 0
    if n%2 == 0:
        continue
    for yaku in range(1, n+1):
        if n%yaku == 0:
            cnt += 1
    if cnt == 8:
        ans += 1
        
print(ans)
n = int(input())
count = 0
for i in range(1, n + 1, 2):
    div = 0
    for j in range(1, i + 1):
        if i % j == 0:
            div += 1
    if div == 8:
        count += 1
print(count)
def main():
    N = int(input())
    ans = 0

    for num in range(1, N + 1, 2):
        cnt = 0
        for i in range(1, num + 1, 2):
            if num % i == 0:
                cnt += 1
        if cnt == 8:
            ans += 1

    print(ans)


if __name__ == "__main__":
    main()
N = int(input())

ok_count = 0
for i in range(1, N + 1, 2):
    # 約数を8個もつものの数
    count = 0
    for j in range(1, i + 1):
        # print("{}".format(j))
        if i % j == 0:
            count += 1
    if count == 8:
        ok_count += 1
print(ok_count)
N = int(input())
ans =[]
for i in range(1,N+1,2):
    count = 0
    for j in range(1,i+1):
        if i % j ==0:
            count += 1
            if count== 8:
                ans.append(i)

print(len(ans))
N = int(input())

ans = 0
for i in range(1, N + 1, 2):
    mod_count = 0
    for j in range(1, i + 1):
        if i % j == 0:
            mod_count += 1
    if mod_count == 8:
        ans += 1
print(ans)
import sys
def I(): return int(sys.stdin.readline().rstrip())

N = I()
if N < 105:
    print(0)
elif N < 135:
    print(1)
elif N < 165:
    print(2)
elif N < 189:
    print(3)
elif N < 195:
    print(4)
else:
    print(5)
n = int(input())
ans = 0
for i in range(1, n + 1, 2):
    yakusu = 0
    for j in range(1, i + 1):
        if i % j == 0:
            yakusu += 1
    if yakusu == 8:
        ans += 1
print(ans)
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 31 09:15:46 2020

@author: black
"""
def check(x):
    div = [1]
    for j in range(1, x):
        if (x)%(j+1) == 0:
            div.extend([j+1])
    return len(div)




N = int(input())
ans = []

for x in range(1, N+1):
    if x%2 == 1:
        if check(x) == 8:
            ans.extend([x])


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

n = int(input())
cnt = 0
for i in range(1, n + 1):
    if i % 2 != 0:
        res = make_divisors(i)
        if res == 8:
            cnt += 1

print(cnt)
N = int(input())

ans = 0

for n in range(1, N+1, 2):
    c = 0
    for i in range(1, n+1):
        if n % i == 0:
            c += 1

    if c == 8:
        ans += 1

print(ans)
import sys
input = sys.stdin.buffer.readline
#input = sys.stdin.readline

def II(): return int(input())
def MI(): return map(int,input().split())
def LI(): return list(map(int,input().split()))

# mod=10**9+7
# rstrip().decode('utf-8')
# map(int,input().split())

def main():
	n=II()
	li=[105,135,165,189,195]
	ans=0
	for i in range(n+1):
		if i in li:
			ans+=1
	print(ans)















if __name__ == "__main__":
	main()
n = int(input())
ans = 0
for i in range(1, n+1):
    if i%2 == 1:
        cnt = 0
        for j in range(1, i+1):
            if i%j == 0:
                cnt += 1
        if cnt == 8:
            ans += 1
print(ans)
import math
import itertools
import numpy as np

def div(n):
    c = 0
    for i in range(1,n+1):
        if n % i == 0:
            c += 1
    return c

def solve():
    n = int(input())
    ans = 0
    for i in range(1,n+1):
        if div(i) == 8 and i % 2 == 1:
            ans += 1
    print(ans)
    return 0

if __name__ == "__main__":
    solve()
n = int(input())
y = 0
for i in range(1, n+1, 2):
    x = 0
    for j in range(1, i+1):
        if i % j == 0:
            x += 1
    if x == 8:
        y += 1
print(y)
def yakusuu(n):
    cnt = 0
    for i in range(1,n+1):
        if n % i == 0:
            cnt += 1
    return cnt
        

N = int(input())
ans = 0
for i in range(1,N+1):
    if i % 2 != 0:
        if yakusuu(i) == 8:
            ans += 1
print(ans)
import sys
import itertools
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N = int(read())
ans = 0
for i in range(1,N+1,2):
  count = 0
  for j in range(1,i+1):
    if i % j ==0:
      count += 1
  if count == 8:
    ans += 1
print(ans)
n = int(input().strip())
ans = 0
for i in range(1, (n + 1), 2):
    cnt = 0
    for j in range(1, (i + 1), 1):
        if (i % j == 0):
            cnt += 1
    if cnt == 8:
        ans += 1
print(ans)
# B - 105

N = int(input())

ans = 0
for i in range(1,N+1,2):
    tmp = 0
    for j in range(1, i+1):
        if i%j==0:
            tmp += 1
    if tmp==8:
        ans += 1

print(ans)
N = int(input())

if N < 105:
    print(0)
    exit()

ans = 0
for i in range(1, N+1, 2):
    count = 0
    for j in range(1, i+1):
        if i % j == 0:
            count += 1

    if count == 8:
        ans += 1

print(ans)
N= int(input())
if N%2==0:
    cand = list(range(1,N,2))
else:
    cand = list(range(1,N+1,2))

ans = 0
num = 0
for n in range(1,N+1):
    num = 0
    for c in cand:
        if n%c==0:
            num+=1
    if num ==8:
        ans+=1
print(ans)
n = int(input())

ans = 0

for i in range(1, n+1):
    if i%2 == 0:
        continue
    
    cnt = 0
    for j in range(1, i+1):
        if i%j == 0:
            cnt += 1
    
    if cnt == 8:
        ans += 1
        
print(ans)
def divi(x):
    d = []
    for i in range(1, int(x**0.5)+1):
        if x%i == 0:
            d.append(i)
            if i!=(x//i):
                d.append(x//i)
    return d
n = int(input())
ans = 0
for j in range(1, n+1, 2):
    if len(divi(j)) == 8:
        ans += 1
print(ans)
n = int(input())

ans = 0
for i in range(1, n+1, 2):
    cnt = 0
    for j in range(1, i+1):
        if i%j == 0:
            cnt += 1

    if cnt == 8:
        ans += 1

print(ans)
def count_div(n):
  res = 0
  for i in range(1, n + 1):
    if n % i == 0:
      res += 1
  return res
n = int(input())
ans = 0
for i in range(1, n + 1, 2):
  if count_div(i) == 8:
    ans += 1
print(ans)
n=int(input())
print(sum(i<=n for i in [105,135,165,189,195]))
N = int(input())
B = 0
for i in range(N):
  A = 0
  for j in range(i+1):
     if (i+1) % (j+1) == 0:
        A += 1
  if A == 8 and (i+1) % 2 == 1:
    B += 1
print(B)
n=int(input())
nm=[0]*(n+1)

for i in range(1,n+1):
    for j in range(1,n+1):
        if i%j==0:
            nm[i]+=1
l=[1 for i in range(1,n+1) if nm[i]==8 and i%2]
print(sum(l))
n = int(input())
lp = []
for i in range(3,int(n//2)+1):
  for k in lp:
    if i%2 == 0 or i%k == 0:
      break
  else:
    lp.append(i)

ans = 0
for i in (range(n)):
  li = []
  for k in lp:
    tmp = i+1
    cnt = 0
    while tmp%k == 0:
      tmp //= k
      cnt += 1
    if cnt > 0:
      li.append(cnt)
  if li in [[1,1,1], [1,3], [3,1], [7]]:
    ans += 1

print(ans)