peterverebics/CodeNet_Python_118 huggingface dataset:
import math
import sys
n = int(sys.stdin.readline())
ans = 0
for i in range(3, n + 1, 2):
    # print(f'{i=}', end=' ')
    count = 0
    for j in range(1, int(math.sqrt(i))):
        if i % j == 0:
            # print(f'{i} % {j} is 0.')
            count += 2
    if count == 8:
        # print(f'{i} have just 8 divisors.')
        ans += 1
print(ans)
#abc106b
n = int(input())
ans = 0

for i in range(1,n+1):
    if i % 2 != 0:
        cnt = 0
        for ni in range(1,i+1):
            if n % ni == 0:
                cnt += 1
        if cnt == 8:
            ans += 1
print(ans)
in_num = int(input())
check_num = 0
ans_counter = 0



while check_num <= in_num:
	i = 1
	div_counter = 0
	while i <= check_num :
		if check_num % i == 0:
			div_counter += 1
		i += 2
	if div_counter == 8:
		ans_counter += 1
	check_num += 2

print(ans_counter)
import sys
input = sys.stdin.readline
N = int(input())
if N < 105 :
    print(0)
elif N >= 105 and N<128 :
    print(1)
elif N>= 128 and N<135 :
    print(2)
elif N>=135 and N< 189 :
    print(3)
else :
    print(4)
n=int(input())
p=[3,5,7,11,13]
x=[]
for i in range(5):
	for j in range(i):
		for k in range(j):
			if n >= p[i]*p[j]*p[k]:
				x.append(i*j*k)
cnt=len(x)
if  135 <= n <189:
	cnt += 1
elif   n  <= 189:
	cnt += 2
else:
	pass
print(cnt)
n=int(input())

if n<105:
    print(0)
elif 105<=n and n<135:
    print(1)
elif 135<=n and n<189:
    print(2)
elif 165<=n and n<189:
    print(3)
elif 189<=n and n<195:
    print(4)
else:
    print(5)
n=int(input())
j=1
a=0
while j<=n:
  d=0
  for i in range(1,j):
    if j%i==0:
      d+=1
  if d==8:
    a+=1
  j+=2
print(a)
N = int(input())

if N < 105:
  ans = 0
elif N == 105:
  ans = 1
else:
  ans = 1
  for n in range(106, N+1):
    count = 0
    for i in range(1, int(n**(1/2))+1):
      if n % i == 0:
      	count += 1
    if count == 8:
      ans += 1
print(ans)
def main():
    n = int(input())
    count = 0
    x_list =[3**3*5, 3**3*7, 3*5*7, 3*5*11]
    for one in x_list:
        if one<=n:
            count+=1
    print(count)

if __name__=="__main__":
    main()
n = int(input())
arr = []
for i in range(1, n + 1):
  a = []
  for j in range(1, i + 1):
    if j % 2 == 1:
      if n % j == 0:
        a.append(j)
  if len(a) == 8:
    arr.append(i)
print(len(arr))
def divisor(x):
  ret=[]
  for i in range(1,x+1):
    if x%i==0:
      ret.append(i)
  return len(ret)

ans=0
n=int(input())
for i in range(1,n+1):
  if divisor(i)==8:
    ans+=1
print(ans)
n = int(input())
if n >= 105:
    print(1)
else:
    print(0)
N = int(input())
ans = 0
for num in range(1,N+1):
  cnt = 0
  for i in range(1,num):
    if num%i==0:
      cnt=cnt+1
      
  if cnt==8:
    ans = ans+1
   
print(ans)
n = int(input())
import itertools

a = [3,5,7,11]
ax = 3*5*7*11
b = []
for i in range(4):
    b.append(ax//a[i])
c = list(itertools.combinations([0, 1, 2, 3], 2))
for j in range(len(c)):
    b.append(a[c[j][0]]**3 * a[c[j][1]])

ans = 0
for i in b:
    if n >= i:
        ans += 1
print(ans)
n=int(input())
if n>=189:
    print('2')
elif n>=105:
    print('1')
else:
    print('0')
N = int(input())
ans = 0
for i in range(1, N, 2):
    c = 0
    for j in range(1, N+1):
        if i%j==0:
            c += 1
    if c==8:
        ans += 1
print(ans)
N = int(input())

ans = []
for i in range(1, N + 1, 2):
    count = 0
    if i == 105:
        print(105)
    for j in range(1, i // 2 + 1):
        if i % j == 0:
            count += 1
    if count == 7:
        ans.append(1)

print(sum(ans))
def yakusu(x):
    A=[]
    for i in range(1,x+1):
        if x%i==0:
            A.append(i)
    return(len(A))
    
n=int(input())
ans=0

for j in range(1,n+1):
    if yakusu(n)==8:
        ans+=1
print(ans)
def main():
    N = int(input())
    num = 0
    for i in range(1, N + 1):
        if i % 2 == 1:
            count = 0
            for j in range(i, N + 1):
                if i // j == 0:
                    count += 1
            if count == 8:
                num += 1
    print(num)
main()
n = int(input())
res = 0
for i in range(1, n + 1):
    temp = i
    cnt = 0
    for j in range(1, temp + 1):
        if temp % i == 0:cnt += 1
    
    if cnt == 8:res += 1
print(res)
n = int(input())
ans = 0
for num in range(1, n+1):
    if num%2 == 1:
        continue
    ls = []
    for i in range(1, num+1):
        if num%i == 0:
            ls.append(i)
    if len(ls) == 8:
        ans += 1
print(ans)
N = int(input())
if N >= 105:
    print(1)
else:
    print(0)
n=int(input())
x=0
for i in range(1,n+1):
  cnt=0
  for j in range(1,i+1):
    if n%j==0:
      cnt+=1
  if cnt==8:
    x+=1
print(x)
def divsor(num):
  count=0
  for i in range(1,num+1):
    if num%i==0:
      count+=1
  return count
 
n=int(input())
 
if(n<=105):
  if(n==105):
    print(1)
  elif(n<105):
    print(0)
    exit()

res=1

for i in range(106,n+1):
  if(divsor(i)==8 and i%2==1):
    res+=1
  print(res)
N = int(input())

if N < 105:
    print(0)
elif N < 165:
    print(1)
elif N < 195:
    print(2)
else:
    print(3)
n = int(input())
if 189 <= n:
    print(4)
elif 165 <= n:
    print(3)
elif 135 <= n:
    print(2)
elif 105 <= n:
    print(1)
else:
    print(0)
N = int(input())


## 約数の列挙O(√N)
def divisor(n): #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 len(table)
  
i = 1
answer = 0
while i < N:
  if divisor(i) == 8:
    answer += 1
  i += 2
print(answer)
N=int(input())
count=0
ans =0
for j in range(N+1):
    count =0
    for i in range(1,N+1):
        if j %2 ==0:
            continue
        if j % i ==0:
            count +=1

        else:
            continue
        if count == 8 and i ==N:
            ans += 1
print(ans)
n = int(input())
ans = []

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

for i in range(105, n + 2, 2):
    divisors = []
    for j in range(1, i + 1):
        if i % j == 0:
            divisors.append(j)

    if len(divisors) == 8:
        ans.append(i)

print(len(ans))
N=int(input())
if N<105:
    print(0)
elif N==105:
    print(1)
else:
    ans=0
    for n in range(106,N+1):
        K=n//2
        y=0
        for k in range(2,K):
            if n%k==0:
                y+=1
        if y==6:
            ans+=1
    print(ans)
N=int(input())
def prime(n):
  cnt=0
  for i in range(2,n):
    if n%2==0:
      cnt+=1
    
  return cnt
      
ans=0
for i in range(1,N+1):
  if prime(i)==8:
    ans+=1
print(ans)
n = int(input())
ans = 0
A = [i for i in range(n+1)]
A = A[1:n+1:2]
for i in range(len(A)):
    a=0
    for j in range(len(A)):
        if A[i] % (j+1) == 0:
            a += 1
    if a == 8:
        ans += 1
print(ans)
N = int(input())
ans = 0
for i in range(1, N+1):
    ans += len([j for j in range(1, i) if i % j == 0]) == 8
print(ans)
#import sys
#import numpy as np
import math
#from fractions import Fraction
import itertools
from collections import deque
from collections import Counter
import heapq
from fractions  import gcd
#input=sys.stdin.readline
import bisect
n=int(input())
ans=0
for i in range(1,n+1,2):
    s=set()
    for j in range(1,int(pow(i,0.5)+1)):
        if i%j==0:
            s.add(j)
            s.add(i//j)
    if len(s)==8:
        print(s)
        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<189 :
    print(2)
else :
    print(3)
n=int(input())

if n<105:
    print(0)
elif 105<=n and n<135:
    print(1)
elif 135<=n and n<189:
    print(2)
else:
    print(3)
def divsor(num):
  count=0
  for i in range(1,num+1):
    if num%i==0:
      count+=1
  return count

n=int(input())

if(n<=105):
  if(n==105):
    print(1)
  elif(n<105):
    print(0)
res=1
for i in range(106,n+1):
  if(divsor(i)==8 and i%2==1):
    res+=1
  print(res)
N = int(input())
count_1 = 0
for i in range(1,N+1,2):
  count_2 = 0
  for j in range(1,i+1,2):
    if N % j == 0:
      count_2 += 1
  if count_2 == 8:
    count_1 += 1
print(count_1)
n= int(input())
ans = 0
for i in range(1,n+1,2):
    count = 0
    for j in range(1,i+1):
        if n%j ==0:
            count +=1
    if count == 8:
        ans +=1
print(ans)
n = int(input())
ans = 0
ku  = 0
for i in range(1,n+1,2):
  if n % i == 0:
      ku+=1
  if ku == 8:
      ans+=1
print(ans)
N = int(input())
 
def check_divisor(number):
  divisors = 0
  for j in range(1, number+1, 2):
    if not (number%j):
      divisors += 1
      if divisors == 9: return False
    if divisors == 8: return True
    else: return False

count = 0
for i in range(1, N+1, 2):
  if check_divisor(i):
    count += 1
n=int(input())
l=list(range(1,n+1))
k=[27,105,125,165,195]
lk=set(l) & set(ｋ)
print(len(lk))
def is_ans(n:int) -> int:
    count = 0
    for i in range(1,n+1):
        if n%i == 0:
            count += 1
    return count

def main():
    tmp = 0
    ans = 0
    n = int(input())
    for i in range(1,n+1):
        if i%2 == 1:
            tmp = is_ans(i)
        if tmp == 8:
            ans += 1
    print(ans)

if __name__ == '__main__':
    main()
l=0
for c in input():
    l+=[0,0,5,1,0,1,2,0,3,4][int(c)]
print(l)
n = int(input())
ans = 0
for j in range(2,n+1):
  if j %2 ==0:
    continue
  div = []
  for i in range(2,j+1):
    if j % i ==0:
      count = 0
      while j%i==0:
        j = j//i
        count += 1
      div.append(count)
    if j == 1:
      break
  if div == [1,1,1]:
    ans += 1
    
print(ans)
import bisect
n = int(input())
lst = [105, 135, 165, 175, 195]
for i in range(5):
  if n < lst[i]:
    print(i)
    exit()
print(5)
n=int(input())
p=[3,5,7,11,13]
x=[]
for i in range(5):
	for j in range(i):
		for k in range(j):
			if n >= p[i]*p[j]*p[k]:
				x.append(i*j*k)
cnt=len(x)
if n >= 135:
	cnt += 1
else:
	pass
print(cnt)
n = int(input())

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

dp = [0] * 201
ans = 0

for i in range(1, n + 1):
    for j in range(105, n + 1):
        if j % i == 0:
            dp[j] += 1

for i in range(105, n + 1, 2):
    if dp[i] >= 8:
        print(i)
        ans += 1

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

li = [3,5,7,11,13,17,19,23,29,31]
ans = 0
for i in range(1,n+1):
    cnt = 0
    for j in range(10):
        if i%li[j]==0:
            cnt += 1
    if cnt ==3:
        ans +=1
print(ans)
n = int(input())

result = 0
for i in range(9, n + 1, 2):
    yakusu = 0
    for j in range(1, i + 1):
        if i % j == 0:
            yakusu += 1
    if yakusu == 8:
        print(i)
        result += 1
print(result)
N=int(input())
if N < 105:
  print("0")
elif N == 105:
  print("1")
else:
  ans = 0
  for i in range(105,N+1):
    nn = i
    c = 0
    s = 2
    while s*s<=i:
      if nn%s==0:
        c += 1
        nn //= s
        while nn%s==0:
          nn //= s
      s+=1
    if nn!=1 and nn!=s:
      c += 1
    if c == 3:
      ans += 1
  print(ans)
n=int(input())
ans=0
for j in range(1,n+1,2):
    count=0
    for i in range(1,j+1):
        if n%i==0:
            count+=1
    if count==8:
        ans+=1
print(ans)
N = int(input())
if (1 <= N < 105):
    print(0)
if (105 <= N < 135):
    print(1)
if (135 <= N < 189):
    print(2)
if (N >= 189):
    print(3)
n=int(input())
ans=0
for i in range(1,n+2,2):
  for k in range(1,i+1):
    x=0
    if i%k==0:
      x+=1
  if x==8:
    ans+=1
print(ans)
# coding = SJIS

n = int(input())

if n >= 189:
    print(3)
elif n >= 135:
    print(2)
elif n >= 105:
    print(1)
else:
    print(0)
number = int(input())

num_eight_divisors = 0

for i in range(9, number + 1, 2):
    num_divisors = 2

    for j in range(2, i // 2):
        if i % j == 0:
            if i == j:
                num_divisors = num_divisors + 1
            else:
                num_divisors = num_divisors + 2

        if num_divisors > 8:
            break

    if num_divisors == 8:
        num_eight_divisors = num_eight_divisors + 1

print(num_eight_divisors)
n = int(input())
s = 0
t = 0
for i in range(1, n + 1):
  for j in range(1, n + 1):
    if i % j == 0 and s % 8 <= 8:
      s += 1
    if i % j == 0 and s > 8:
      t += 1
print(t)
n = int(input())
cnt, ans = 0, 0
if n == 105:
    print(1)
elif n <= 104:
    print(0)
else:
    for x in range(107,200,2):
        cnt = 0
        for y in range(1,x+1):
            if x % y == 0:
                cnt += 1
        if cnt == 8:
            ans += 1
    print(ans+1)
n = int(input())
l = []
odd = []
ans = []

for s in [i for i in range(1,n+1) if i % 2 == 1]:
  for i in range(1,int(s**0.5)+1):
    if s % i == 0:
        l.append(i)
        if len(l)==8:
            ans.append(s)
ans = set(ans)
print(len(ans))
N = int(input())

if N >= 105:
  print(1)
else:
  print(0)
n = int(input())

def divisor(n):
    res = 0
    for i in range(1,n+1):
        if n % i  == 0:
            res += 1
            if i != n//i:
                res += 1
    return res

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

def trial_div(n):
  factors = []
  f = 2
  while f*f <= n:
    if n % f == 0:
      n //= f
      factors.append(f)
    else:
      f += 1
  return factors

res = 0
for i in range(1,N+1):
  if i == 1:
    continue
  if i % 2 == 0:
    continue
  factors = trial_div(i)
  n_divisor = 2**len(factors)
  if n_divisor == 8:
    res += 1
  
print(res)
N = int(input())
cnt =  0
ans = 0
for i in range(1, N+1, 2):
    for j in range(1, i+1):
        if i % j == 0:
            cnt += 1
    if cnt == 8:
        ans += 1
print(ans)
from math import sqrt
N = int(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))):
    if i%j==0:
      c+=2
  if c==8:
    ans += 1
print(ans)
N = int(input())

if N < 105:
  ans = 0
elif N == 105:
  ans = 1
else:
  ans = 1
  for n in range(106, N+1):
    if n % 2 == 0:
      continue
    count = 0
    for i in range(1, int(n**(1/2))+1):
      if n % i == 0:
      	count += 1
    if count == 8:
      ans += 1
print(ans)
n = int(input())
cnt = 0
l = []
for i in range(1, n+1):
    if i % 2 == 1:
        for d in (1, i+1):
            if n % i == 0:
                l.append(i)
        if len(l) == 8:
            cnt += 1
print(cnt)
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, a):
        if a % b == 0:
            count += 1
    count_list.append(count)
    count = 0

print(len(list(filter(lambda x: x == 8, count_list))))
N = int(input())
cnt=0
y=[]

for i in range(1,N+1,2):
    for j in range(1,i+1):
        if i%j == 0:
            y.append(j)
    if len(y)==8:
        cnt += 1
        print(y)
    y.clear()
print(cnt)
n = int(input())
if n < 105:
  print(0)
elif n < 165:
  print(1)
elif n < 195:
  print(2)
else:
  print(3)
n = int(input())

if n < 105:
    print(0)
else:
    print(1)
import math 
n = int(input())
cnt = 0
if n ==1:
    print(cnt)
    exit()
for i in range(1,int(math.sqrt(n))+1):
    if n % i == 0:
       cnt += 1
print(cnt*2)
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    N = int(input())
    result = 0
    for i in range(1, N + 1):
        if N % i == 0:
            result += 1
    print(1 if result == 8 else 0)


if __name__ == "__main__":
    main()
n=int(input())
res=0
for i in range(1,n+1):
  cnt =0
  for j in range(1,i+1):
    if i % j == 0:
      cnt+=1
  if cnt ==8:
    res+=1
print(res)
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(n):
  if i % 2 == 1:
    if check(i) == 8:
      ans += 1
      
print(ans)
N = int(input())

if N == 105:
  print(1)
else:
  print(0)
def get_divisors(n):
    div = []
    append = div.append
    for i in range(1, int(n ** 0.5) + 1):
        if n % i == 0:
            append(i)
            if i != n // i:
                append(n // i)
    div.sort()
    return div


# input
N = int(input())

# check
cnt = 0
for n in range(1, N + 1):
    div = get_divisors(n)
    if len(div) == 8:
        cnt += 1

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

def trial_division(n):
    prime_factors = list()
    while n % 2 == 0:
        prime_factors.append(2)
        n //= 2
    p = 3
    while p * p <= n:
        if n % p == 0:
            prime_factors.append(p)
            n //= p
        else:
            p += 2
    if n != 1:
        prime_factors.append(n)
    return prime_factors

cnt = 0
for i in range(1,N+1,2):
    if len(set(trial_division(i))) == 3:
        cnt += 1
print(cnt)
n=int(input())
ans=0
for i in range(1,n+2,2):
  x=0
  for k in range(1,i+1):
    if i%k==0:
      x+=1
  if x==8:
    ans+=1
print(ans)
n = int(input())

con = 0
ans = 0

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

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

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

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

print(ans)
def yakusu(x):
    A=[]
    for i in range(1,x+1):
        if x%i==0:
            A.append(i)
    return(len(A))
    
n=int(input())
ans=0

for j in range(1,n+1):
    if yakusu(j)==8:
        ans+=1
print(ans)
n = int(input())
total, count = 0,0
for i in range(1, n+1, 2):
    for j in range(1, i+1):
        if i % j == 0:
            count += 1
    print(count)
    if count == 8:
        total += 1
    count = 0
print(total)
a = int(input())
if a < 105:
    k = 0
elif a < 165:
    k = 1
elif a < 195:
    k = 2
else:
    k = 3
print(k)
import sys, math
def input():
    return sys.stdin.readline()[:-1]
from itertools import permutations, combinations
from collections import defaultdict, Counter
from math import factorial
from bisect import bisect_left # bisect_left(list, value)
#from fractions import gcd

sys.setrecursionlimit(10**7)
N = int(input())

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

cntt = 0
for i in range(1, N+1, 2):
    cnt = 0
    for j in range(1, int(math.sqrt(i)), 2):
        if i%j==0:
            cnt += 2
    if cnt == 8:
        cntt += 1
print(cntt)
N=map(int,input().split())
cnt=0
l=[3*5*7,3*5*9,3*5*11,3*5*13]
for n in N:
  cnt+=(n in l)
print(cnt)
n = int(input())
ans = 0
for num in range(1, n):
    if num%2 == 1:
        continue
    ls = []
    for i in range(1, num+1):
        if num%i == 0:
            ls.append(i)
    if len(ls) == 8:
        ans += 1
print(ans)
n = int(input())
count = 0
ans = 0
j = 1

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

elif n == 105:
  print(1)
  
else:
  for i in range(107,n+1,2):
    a=0
    for j in range(i):
      if i%(j+1)==0:
        a += 1
    if a==8:
      ans +=1
  print(ans)
N = int(input())
result = 0
for i in range(1,N+1,2):
    count = 0
    for j in range(1,i,2):
        if i %j ==0:
            count+=1
        
    if count ==8:
        result +=1
print(result)
n = int(input())
if n == 105:
  print(1)
else:
  print(0)
N = int(input())
# (a * b * c) or (d * d * d * e)
# (a, b, c) = (3, 5, 7) -> 105
# (a, b, c) = (3, 5, 11) -> 265 out
# (d, e) = (3, 5) -> 135
# (d, e) = (3, 7) -> 189
# (d, e) = (3, 11) -> 297 out
# (d, e) = (5, 3) -> 375 out
# therefore: 105, 135, 189

print(0) if N < 105 else print(1) if N < 135 else print(2) if N < 189 else print(3)
import math
def countYakusu(n):
  count = 0
  for i in range(n):
    if n % (i+1) == 0:
      count = count + 1
  return count == 8

N = int(input())
count = 0
for i in range(math.ceil(N/2)):
  count = count + countYakusu(i*2)
print(count)
N=int(input())
ans=0
for i in range(1,N+1,2):
    if i>1:
        div_list=[1,i]
        for j in range(2,int(i**0.5)+1):
            if i%j==0:
                div_list.append(j)
        if len(div_list)==8:
            ans+=1
print(ans)
N=int(input())
X=[3, 5, 7, 11, 13]
ans=0
for n in range(1,N+1):
  _X=[1 if n%x==0 else 0 for x in X]
  if sum(_X)==3:
    ans+=1
print(ans)
# -*- coding: utf-8 -*-
 
import math
import itertools
import sys
import copy
 
# 入力
#A, B, C, D = map(int, input().split())
#L = list(map(int, input().split()))
#S = list(str(input()))
N = int(input())

if N <= 105 :
  print (1)
  exit()

cnt = 1
for i in range(107, N+1, 2) :
  q = 0
  for j in range(1, i+1) :
    if i%j == 0 :
      q += 1
  if q == 8 :
    cnt += 1
print (cnt)
N=int(input())
if N<=104 :
  print(0)
else :
  print(1)
n=int(input())

count=0
ans=0
if n<=104:
    print('0')
else:
    for i in range(105,n+1):
        count=0
        for e in range(1,n+1):
            if i%2==0:
                break
            elif i%e==0:
                count+=1
        if count==8:
            ans+=1
print(ans)
def countyaku(m):
    count = 0
    for i in range(1,m+1):
        if m%i==0:
            count += 1
    if count == 8:
        return True
    else:
        return False
n = int(input())
if n<105:
    print(0)
else:
    ans = 0
    for j in range(105,n+1):
        if countyaku(j):
            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 divisors
result = 0

for i in range(1,n+2,2):
    if i > 200:
        break
    #print(i)
    if len(make_divisors(i)) == 8:
        result += 1
    

print(result)
n = int(input())
ans = 0
cnt = 0
for s in range(1,n+1):
    if s % 2 == 1:
       for j in range(1,int(s**0.5)+1):
          if s % j == 0:
            cnt += 1
    if cnt == 8:
        ans += 1
        cnt = 0
print(ans)
n=int(input())
ans=0
for j in range(n+1):
    count=0
    for i in range(1,j+1):
        if n%i==0:
            count+=1
    if count==8:
        ans+=1
print(ans)
N = int(input())

def trial_div(n):
  factors = []
  f = 2
  while f*f <= n:
    if n % f == 0:
      n //= f
      factors.append(f)
    else:
      f += 1
  if n != 1:
    factors.append(n)
  return factors

res = 0
for i in range(1,N+1):
  if i == 1:
    continue
  if i % 2 == 0:
    continue
  factors = trial_div(i)
  if len(factors) == 3 \
    and factors[0] < factors[1] \
    and factors[1] < factors[2]:
    res += 1
  
print(res)
N = int(input())
if (N < 105):
    print(0)
if (105 <= N < 135):
    print(1)
if (135 <= N < 189):
    print(2)
if (N >= 189):
    print(3)
N = int(input())
if N < 105:
    print(0)
else:
    print(1)
N = int(input())
ans = 0
if N < 105:
  print(0)
elif N == 105:
  print(1)
else:
  for i in range(106,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
n = int(input())

ans = 0

for i in range(1, n+1):
    count = 0
    if i % 2 == 1:
        for j in range(1, int(math.sqrt(i))):
            if i % j == 0:
                count += 1
        if count == 4:
            ans += 1

print(ans)
import sys
c = 0
n = int(input())
if n%2==1:
    for i in range(1,n+1):
        n%i == 0
        c += 1
        if c == 8:
            print('1')
            sys.exit()
print('0')
import math

def countDividers(n):
    divisors = []
    for i in range(1, int(math.sqrt(n))):
        if n % i == 0:
            divisors.append(i)
            divisors.append(int(n/i))
    return len(divisors)

if __name__ == '__main__':
    n = int(input())
    count = 0
    for i in range(1,n+1):
        if i %2 ==1 and countDividers(i) == 8:
            count += 1
            #print(i)
    print(count)
N=int(input())
res = 0
def checkOdd(N):
  k = 0
  for i in range(1,N+1):
    if N % i ==0:
      k += 1
  if k == 8:
    return True
  else:
    return False

if N<104:
  print(res)
else:
  for i in range(105,N+1):
    if checkOdd(i):
      res += 1
  print(res)