Problem:
 Score: 200 points    Problem Statement  The number 105 is quite special - it is odd but still it has eight divisors.
Now, your task is this: how many odd numbers with exactly eight positive divisors are there between 1 and N (inclusive)?      Constraints   N is an integer between 1 and 200 (inclusive).         Input  Input is given from Standard Input in the following format:  N       Output  Print the count.        Sample Input 1 105      Sample Output 1 1  Among the numbers between 1 and 105 , the only number that is odd and has exactly eight divisors is 105 .       Sample Input 2 7      Sample Output 2 0  1 has one divisor. 3 , 5 and 7 are all prime and have two divisors. Thus, there is no number that satisfies the condition.

Solution (Python):
num = int(input())

import math

def find_factors (n): 
    limit = int(math.sqrt(n)+1)
    count = 0
    list=[]
    for i in range (1,limit):
        if n % i ==0:
            list.append(i)
            list.append (int(n/i))
            count = len(list)
    return count

if num >105:
    ccount = 1
    temp = 107
    while temp <= num:
        if find_factors(temp)==8:
            ccount +=1
        temp+=2
    print (ccount)
elif num ==105:
    print ("1")
elif num < 105:
    print ("0")

Solution (Python):
n=int(input())
x=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:
        x+=1
print(x)

Solution (Python):
n=int(input())

def divisor_num(n):
  ass = []
  for i in range(1,n+1):
    if n%i == 0:
      ass.append(i)
      if i**2 == n:
        continue
        ass.append(n//i)
  return len(ass)

cnt=0
for i in range(1,n+1,2):
  if divisor_num(i) == 8:
    cnt+=1
print(cnt)

Solution (Python):
anslist=(3*5*7,
         3*5*11,
         3*5*13,
        3*5**3,5*3**3,7*3**3)

n=int(input())
cnt=0
for i in range(1,n+1,2):
  if i in anslist:
    cnt+=1
    
print(cnt)

Solution (Python):
N = int(input())
List_N = [i for i in range(1,N+1)]
ODD_N = List_N[::2]
special_number = 0
for i in ODD_N:
    cnt = 0
    for j in range(1, int(i)+1):
        if int(i) % j == 0:
            cnt += 1
    if cnt == 8:
        special_number += 1
print(special_number)

Solution (Python):
n = int(input())
ans = 0

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

print(ans)

Solution (Python):
a = [3*5*7,3**3*5,3**3*7,3*5*11,3*5*13]
N = int(input())
ans = 0
for i in a:
  if N>=i:
    ans+=1
print(ans)

Solution (Python):
def count_divisors(num):
  factor = 2
  divisors = 1
  
  while num > 1:
    exp = 0
    while num % factor == 0:
      num //= factor
      exp += 1
    divisors *= (exp + 1)
    factor += 1
    
  return divisors

n = int(input())
res = 0

for i in range(1, n + 1, 2):
  if count_divisors(i) == 8:
    res += 1
    
print(res)

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

Solution (Python):
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())

cnt = 0

for n in range(1, N+1):
    if n % 2 == 1:
        divisors = make_divisors(n)
        if len(divisors) == 8:
            cnt += 1

print(cnt)

Solution (Python):
iog = [105, 135, 165, 189, 195]

n = int(input())
if(n in iog):
    print(iog.index(n) + 1)
else:
    iog.append(n)
    iog.sort()
    print(iog.index(n))

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

Solution (Python):
n=int(input())
print(len([i for i in [105,135,165,189,195] if i<=n]))

Solution (Python):
n=int(input())
count=0
for i in range(1,n+1,2):
  check=0
  for k in range(1,i+1):
    if i%k==0:
      check+=1
  if check==8:
    count+=1
print(count)

Solution (Python):
import sys
input = sys.stdin.readline

N = int(input())
ans=0
for i in range(1,N+1,2):
    j = 1
    cnt=0
    while j <= int(i**0.5):
        if i%j==0:
            cnt+=1
            if i//j!=j:
                cnt+=1
        j+=1
    if cnt==8:
        ans+=1
print(ans)

Solution (Python):
from math import sqrt, ceil

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

Solution (Python):
n = int(input())
count = 0

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

print(count)

Solution (Python):
n = int(input())
ans = 0
if n>=105:
    ans +=1

if n>=135:
    ans +=1

if n>=165:
    ans +=1

if n>=189:
    ans +=1

if n >=195:
    ans +=1

print(ans)

Solution (Python):
n = int(input())
a=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:
      a+=1
print(a)

Solution (Python):
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)

Solution (Python):

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

n = int(input())

ans = 0

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

Solution (Python):
n=int(input())

result=0
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:
    
    result+=1
    
print(result)

Solution (Python):
def is_divisor_8(num):
  cnt = 0
  for i in range(1,num+1):
    if num%i == 0: cnt += 1
    if cnt > 8: return False
  if cnt == 8: return True
  else: return False

N = int(input())
ans = 0
for i in range(1,N+1,2):
  if is_divisor_8(i) is True:
    ans += 1
print(ans)

Solution (Python):
n = int(input())
a = [105, 135, 165, 189, 195]
for i in range(5):
    a[i] = 1 if n >= a[i] else 0
print(sum(a))

Solution (Python):
n = int(input())
a = [105, 135, 165, 189, 195]
for i in range(5):
    a[i] = 1 if n >= a[i] else 0
print(sum(a))

Solution (Python):
n = int(input())
nSum = 0
for i in range(n):
    cnt = 0
    if (i + 1) % 2 != 0:
        for j in range(i + 1):
            if (i + 1) % (j + 1) == 0:
                cnt += 1
        if cnt == 8:
            nSum += 1

print(nSum)

Solution (Python):
n = int(input())
nSum = 0
for i in range(n):
    cnt = 0
    for j in range(i + 1):
        if (i + 1) % (j + 1) == 0:
            cnt += 1
    if cnt == 8 and (i + 1) % 2 != 0:
        nSum += 1

print(nSum)

Solution (Python):
n = int(input())
count = 0
for ni in range(1,n+1):
    if ni%2 == 1:
        nj_count = 0
        for nj in range(1,ni+1):
            if ni%nj == 0:
                nj_count += 1
        if nj_count == 8:
            count += 1
print(count)

Solution (Python):
N = int(input())
count = 0
count_temp = 0
for i in range(3,N+1, 2):
  count_temp = 0
  for j in range(1, i+1, 2):
    if i % j == 0:
      count_temp += 1
  if count_temp == 8:
    count += 1
print(count)

Solution (Python):
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)

Solution (Python):
N=int(input())
m=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:
    m+=1
print(m)

Solution (Python):
lis = [i+1 for i in range(int(input()))]
num = lis[0::2]
ans = 0
for i in num:
  c = 0
  for j in range(1,i+1):
    if i % j == 0:
      c += 1
  if c == 8:
    ans +=1

print(ans)

Solution (Python):
n = int(input())

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

print(res)

Solution (Python):
import collections

n = int(input())


def eratosthenes(n):
    sieve = [True for _ in range(n + 1)]
    sieve[0] = False
    sieve[1] = False

    def _update(p):
        if sieve[p]:
            for i in range(p * 2, n + 1, p):
                sieve[i] = False

    _update(2)
    p = 3
    while p * p <= n:
        _update(p)
        p += 2
    return sieve


sieve = eratosthenes(n)

res = 0
for k in range(1, n + 1, 2):
    counter = collections.Counter()
    for i in range(1, k):
        if sieve[i]:
            while k % i == 0:
                counter[i] += 1
                k //= i
    p = 1
    for v in counter.values():
        p *= v + 1
    if p == 8:
        res += 1

print(res)

Solution (Python):
n = int(input())
ans = 0
for i in range(1,n+1,2):
    c = 0
    for j in range(1,n+1):
        if i % j == 0:
            c += 1
    if c == 8:
        ans += 1

print(ans)

Solution (Python):
n = int(input())
counts = 0
ans = 0
for i in range(2, n + 1):
    for j in range(1, i + 1):
        if i % j == 0 and i % 2 != 0:
            counts += 1
    if counts == 8:
        ans += 1
    counts = 0
print(ans)

Solution (Python):
N = int(input())


def is_divisor_counter8(num):
    count = 0
    for i in range(1, num+1):
        if num % i == 0:
            count += 1
    return True if count == 8 else False


count = 0
for i in range(1, N+1, 2):
    if is_divisor_counter8(i):
        count += 1
print(count)

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

Solution (Python):
def divisor(x):
  divx = []
  for i in range(1,x+1):
    if x%i == 0:
      divx += [i]
  return divx
n = int(input())
ans = []
for j in range(1,n+1):
  if j%2 == 1 and len(divisor(j)) == 8:
    ans += [j]
print(len(ans))

Solution (Python):
n=int(input())
ans=0
for i in range(1,n+1):
  temp=0
  if i%2:
    for j in range(1,i+1):
      if i%j==0:
        temp+=1
  if temp==8:
    ans+=1
print(ans)

Solution (Python):
import os, sys, re, math

def doit(N):
    ret = 0
    for i in range(105, N+1, 2):
        if countit(i) == 8:
            ret += 1
    return ret


def countit(N):
    cnt = 0
    for i in range(1, N+1):
        if N % i == 0:
            cnt += 1
    return cnt

N = int(input())
print(doit(N))

Solution (Python):
n = int(input())
ans = 0
for i in range(1,n+1):
  if i % 2 == 1:
    sum = 0
    for j in range(1,i+1):
      if i % j == 0:
        sum += 1
    if sum == 8:
      ans += 1
print(ans)

Solution (Python):
n=int(input())
ans=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 and i % 2 == 1:
    ans += 1
    
print(ans)

Solution (Python):
a = int(input())
count=0
for num in range(1,a+1):
    c=0
    if(num%2==1):
        for i in range(1,num+1):
            if num%i==0:
                c+=1
        if c==8:
            count+=1
print(count)

Solution (Python):
n = int(input())
cnt = 0
tmp = 0
for i in range(1, n + 1, 2):
    tmp = 0
    for j in range(1, n + 1, 2):
        if (i % j == 0):
            tmp += 1
    if (tmp > 7):
        cnt += 1
print(cnt)

Solution (Python):
line = raw_input()
n = int(line)





r = [105, 135, 165, 189, 195]

print len([i for i in r if n >= i])

Solution (Python):
import os, sys, re, math

lines = sys.stdin.readlines()

(N) = int(lines[0])

factors = dict()
for i in range(201):
    for j in range(201):
        m = i * j
        if m <= 200:
            if not m in factors:
                factors[m] = []
            factors[m].append(i)

count = 0
for i in range(1, N + 1, 2):
    if len(factors[i]) == 8:
        count += 1

print (count)

Solution (Python):
print(sum([sum([(i % j == 0) for j in range(1, i + 1)]) == 8 for i in range(1, int(input()) + 1, 2)]))

Solution (Python):
N = int(input())
ans = 0
a = [105, 135, 165, 189, 195]
for i in range(5):
    if a[i] <= N : ans+=1
print(ans)

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

Solution (Python):
N = int(input())
lst = [i for i in range(1, N+1, 2)]
ans = 0
for i in lst:
    cnt = 0
    for j in range(1, i+1):
        if i % j == 0:
            cnt += 1
    if cnt == 8:
        ans += 1
print(ans)

Solution (Python):
N = int(input())

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

Solution (Python):
N=int(input())
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)

Solution (Python):
n=int(input())
tmp=0
ans=0
for i in range(1,n+1):
    tmp=0
    for j in range(1,i+1):
        if i%j==0:
            tmp+=1
    if tmp==8 and i%2==1:
        ans+=1
print(ans)

Solution (Python):
N = int(input())
ans = 0

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

print(ans)

Solution (Python):
N = int(input())
i = 0
j = 0
count = 0
flag = 0

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

Solution (Python):

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)

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

Solution (Python):

import sys


def ILI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def ISI(): return map(int, sys.stdin.readline().rstrip().split())
def II(): return int(sys.stdin.readline().rstrip())
def ISS(): return sys.stdin.readline().rstrip().split()
def IS(): return sys.stdin.readline().rstrip()

N = II()
cnt = 0
ans = 0
for i in range(1, N+1)[::2]:
    n = 1
    cnt = 0
    while n <= i:
        if i%n == 0:
            cnt+=1
        n+=1
    if cnt == 8:
        ans += 1
print(ans)

Solution (Python):
n=int(input())
print(5 if n>194 else 4 if n>188 else 3 if n>164 else 2 if n>134 else 1 if n>104 else 0)

Solution (Python):
l = [ 3**7, 3*3*3*5, 3*3*3*7, 3*3*3*11, 3*5*7, 3*5*11, 3*5*13, 3*5*17, 3*7*11, ]

N = int(input())
r = len(list(filter(lambda i: i <= N, l)))
print(r)

Solution (Python):
def make_divisors(n):
    '''
    nの約数リストを返す
    '''
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0 and i % 2 == 1:
            divisors.append(i)
            if i != n // i and n//i % 2 == 1:
                divisors.append(n//i)
    
    return divisors


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

Solution (Python):
n = int(input())

def cnt(x):
    c = 0
    for i in range(1, x+1, 2):
        if x % i == 0:
            c += 1
    return c

def ans(x):
    c = 0
    for i in range(1, x+1):
        if cnt(i) == 8:
            c += 1
    return c

print(ans(n))

Solution (Python):
N = int(input())

x = 0
for i in range(1, N + 1, 2):
    y = 0
    for j in range(i // 2):
        if i % (j + 1) == 0:
            y += 1
    if y + 1 == 8:
        x += 1

print(x)

Solution (Python):
N=int(input())

x=0
for i in range(1,N+1,2):
    y=0
    for j in range(i//2):
        if i % (j+1) == 0:
            y+=1
    if y+1 == 8:
        x+=1

print(x)

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

Solution (Python):
N = int(input())
ans = 0

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

print(ans)

Solution (Python):
n = [int(i) for i in range(1, int(input())+1)]
print(n.count(105)+n.count(135)+n.count(165)+n.count(189)+n.count(195))

Solution (Python):
n=int(input())
ans=0
dcnt=0
for i in range(1,n+1):
        if i%2!=0:
                for j in range(1, i+1):
                        if i%j==0:
                                dcnt += 1
                if dcnt==8:
                        ans += 1
                dcnt=0
print(ans)

Solution (Python):
N = int(input())
L = [x for x in range(1, N + 1) if x % 2 != 0]

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

print(ans)

Solution (Python):
n = int(input())
oddlist = []
tmp = 0
c = 0

for i in range(100):
  if 2*i+1 <= n:
    oddlist.append(2*i+1)
    
for j in oddlist:
  for k in range(1,201):
    if j%k == 0:
      tmp += 1
  if tmp == 8:
    c += 1
  tmp = 0
  
print(c)

Solution (Python):
def num_divisors(n):
  res = 0
  i = 1
  while i * i <= n:
    if n % i == 0:
      res += 1
      res += 1 if i * i != n else 0
    i += 1
  return res


N = int(input())
res = 0
for n in range(1, N + 1, 2):
  if num_divisors(n) == 8:
    res += 1
print(res)

Solution (Python):
N = int(input())

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

    if cnt == 8:
        c += 1

print(c)

Solution (Python):
n = int(input())
print(sum([i <= n for i in [105,135,165,189,195]]))

Solution (Python):
N = int(input())
ans = 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:
        ans += 1

print(ans)

Solution (Python):
def main():
    N = int(input())

    count = 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:
            count += 1
    print(count)

if __name__ == "__main__":
    main()

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  

n = ni()
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)

Solution (Python):
N = int(input())
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)

Solution (Python):

n = int(input())

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


print(ans)

Solution (Python):
import sys
stdin = sys.stdin

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

n = ni()
c = 0
for num in range(3, n+1, 2):
    d = 0
    for i in range(1, num+1):
        if num % i == 0:
            d += 1
    
    if d == 8:
        c += 1
print(c)

Solution (Python):
n = int(input())

targets = []
for i in range(1, n + 1):
    if i % 2 == 0:
        continue
    cnt = 0
    for j in range(1, n + 1):
        if i % j == 0:
            cnt += 1
    if cnt == 8:
        targets.append(i)
print(len(targets))

Solution (Python):
n = int(input())

ans = 0

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

Solution (Python):
n = int(input())
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)

Solution (Python):
n = int(input())
answers = [105, 135, 165, 189, 195]
for i, a in enumerate(answers):
  if n < a:
    print(i)
    break
  
else:
  print(5)

Solution (Python):
primes = [2]
for i in range(3, 200):
  for prime in primes:
    if i % prime == 0:
      break
  else:
    primes.append(i)
    
n = int(input())

ans = 0
for i in range(1, n + 1, 2):
  count = 0
  for prime in primes:
    if i % prime == 0:
      i //= prime
      count += 1
  if i == 1 and count == 3:
    ans += 1
    
for i in [3, 5]:
  for prime in primes[1:25]:
    if (i ** 3) * prime <= n and i != prime:
      ans += 1
    
print(ans)

Solution (Python):
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())
count = 0
for i in range(1, N + 1, 2):
    if len(make_divisors(i)) == 8:
        count+=1

print(count)

Solution (Python):
from math import sqrt 

def count_divisor(n):
  count = 0
  for d in range(1, int(sqrt(n+1))):
    if n%d == 0:
      count+=1  
  return count*2      

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

Solution (Python):
N = int(input())
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)

Solution (Python):
n=int(input())
if n>=105:
    if n>=135:
        if n>=165:
            if n>=189:
                if n>=195:
                    print(5)
                else:
                    print(4)
            else:
                print(3)
        else:
            print(2)
    else:
        print(1)
else:
    print(0)

Solution (Python):
anscnt = 0
n = int(input())
for i in range(1,n+1):
    if i%2==0:
        pass
    else:
        cnt = 0
        for j in range(1,i+1):
            if i%j == 0:
                cnt +=1
            if cnt ==8:
                anscnt +=1
                break
print(anscnt)

Solution (Python):
n = int(input())

def devisor(n):
	devs = []
	for i in range(1,n+1):
		if i**2 > n:
			break
		if n % i == 0:
			devs.append(i)
			if i != n // i:
				devs.append(n//i)
	return devs

cnt = 0
for i in range(1,n+1):
	if i % 2 == 0:
		continue
	ndevs = len(devisor(i))
	if ndevs == 8:
		cnt += 1

print(cnt)

Solution (Python):
n=int(input())
inputs=[i for i in range(n+1) if i%2==1]

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

ans=0
for i in inputs:
  if make_divisors(i)==8:
    ans+=1
print(ans)

Solution (Python):
from bisect import*;print("012345"[bisect([105,135,165,189,195],int(input()))])

Solution (Python):
N = int(input())
s = 0
for i in range(1, N + 1, 2):
    cou = 0
    for j in range(1, i + 1):
        if i % j == 0:
            cou += 1
    if cou == 8:
        s += 1
print(s)

Solution (Python):
import numpy as np
def factorize(N):
    up = int(np.sqrt(N))+2
    out = {}

    for i in range(2,up):
        if N%i == 0:
            temp = N
            count = 0
            while(True):
                N = N//i
                count += 1
                if N%i != 0:
                    break
            out[i] = count
        else:
            continue
    if N != 1:
        out[N] = 1
    return out

n = int(input())
ans = 0
for i in range(1,n+1,2):
    d = factorize(i)
    temp = 1
    for k in d:
        temp*=(d[k]+1)
    if temp == 8:
        ans += 1
    
    
    
print(ans)

Solution (Python):
N=input()
N=int(N)
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
u=0
for i in range(N):
    a=make_divisors(i+1)
    if len(a)==8 and (i+1) % 2==1:
        u+=1

    

print(u)

Solution (Python):
def test():
    n = int(input())
    count = 0
    a = []
    for i in range(1,n+1):
        if i % 2 != 0:
            for j in range(1,i+1):
                if i % j == 0:
                    count += 1
        a.append(count)
        count = 0
    print(a.count(8))


if __name__ == "__main__":
    test()

Solution (Python):
def div(N):
    ans = []
    for i in range(1, int(N ** 0.5) + 1):
        if N % i == 0:
            ans.append(i)
            if N // i != i:
                ans.append(N // i)
    ans.sort()
    return ans


N = int(input())
ans = 0
for i in range(1, N + 1):
    if i % 2 == 1:
        di = []
        di = div(i)
        if len(di) == 8:
            ans += 1
print(ans)

Solution (Python):
n = int(input())
result = 0
l = list(range(1,n+1,2))
for i in l:
    s = 1
    for j in range(1,i,2):
        if i % j == 0:
            s += 1
    if s == 8:
        result += 1
print(result)

Solution (Python):
n = int(input())
def yakusu(a):
    b = 1
    num = 0
    if a == 1:
        return 1
    while b<=a:
        if a%b == 0 and b%2 ==1:
            num += 1
        b += 1
    return num
    
li = []
for i in range(1,n+1):
    li.append(yakusu(i))

print(li.count(8))

Solution (Python):
N = int(input())

def find_divisor_num(n):
    count = 0
    i = 1
    while i**2 < n:
        if n % i == 0:
            count += 2
        i += 1
    if n == i**2:
        count += 1
    return count

count = 0
for i in range(1, N+1, 2):
    divisor_num = find_divisor_num(i)
    if divisor_num == 8:
        count += 1

print(count)

Solution (Python):
import math

def main():
    N = int(input())
    count = 0
    for m in range(1, N+1):
        if m % 2 == 1 and factors(m):
            count += 1
    return count

def factors(m):
    fs = set()
    for i in range(1, int(math.sqrt(m))+1):
        if m % i == 0:
            fs.add(i)
            fs.add(m // i)
    if len(fs) == 8:
        return True
    else:
        return False


if __name__ == '__main__':
    print(main())

Solution (Python):
n=int(input())
print(len([a for a in [105,135,165,189,195] if a<=n]))

Solution (Python):
def primeFacter(x):
    i = 1
    cnt = 0
    while i <= 200:
        if x % i == 0:
            cnt +=1
        i += 1
    return cnt
n = int(input())
cnt = 0
for i in range(1,n+1,2):
    if primeFacter(i) == 8:
        cnt += 1
print(cnt)

Solution (Python):
import math
import sys
import queue
from collections import Counter
from itertools import accumulate
from fractions import gcd
from functools import reduce

def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

mod = 1000000007

"""


    = sys.stdin.readline().rstrip()
    = list(sys.stdin.readline().rstrip())


    = int(sys.stdin.readline())
    = map(int, sys.stdin.readline().split())
    = list(map(int, sys.stdin.readline().split()))
    = [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""

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


if __name__ == "__main__":
    N = int(sys.stdin.readline())
    ans = 0
    print(sum(count(x) == 8 for x in range(1, N + 1, 2)))

Solution (Python):
import math
import sys
import queue
from collections import Counter
from itertools import accumulate
from fractions import gcd
from functools import reduce

def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

mod = 1000000007

"""


    = sys.stdin.readline().rstrip()
    = list(sys.stdin.readline().rstrip())


    = int(sys.stdin.readline())
    = map(int, sys.stdin.readline().split())
    = list(map(int, sys.stdin.readline().split()))
    = [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""

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


if __name__ == "__main__":
    N = int(sys.stdin.readline())
    ans = 0
    for i in range(1, N + 1):
        if i % 2 != 0:
            if count(i) == 8:
                ans += 1
    print(ans)

Solution (Python):
n=int(input())
ans=0
for i in range(1,n+1,2):
    check=0
    for j in range(1,i+1):
        if i%j==0:
            check+=1
    if check==8:
        ans+=1
print(ans)

Solution (Python):
n = int(input())

res_cnt = 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:
        res_cnt += 1

print(res_cnt)

Solution (Python):
n=int(input())
i=0
num_count=0
while(2*i+1<=n):
    count=0
    for k in range(1,(2*i+1)+1,2):
        if (2*i+1)%k==0:
            count+=1
    if count==8:
        num_count+=1
    i+=1
print(num_count)

Solution (Python):
n = int(input())
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)

Solution (Python):
import sys
input = sys.stdin.readline
n=int(input())

ans=0
if n<=104:
    print(0)
else:
    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)

Solution (Python):
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 and i % 2 != 0:
            count += 1
    if count == 8 and i % 2 != 0:
        ans += 1
print(ans)

Solution (Python):
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)

Solution (Python):
n = int(input())
ans = 0
for i in range(1,n+1,2):
    cnt_div = 0
    for j in range(1,i+1):
        if i%j == 0:
            cnt_div += 1
    if cnt_div == 8:
        ans += 1

print(ans)

Solution (Python):
import math
N = int(input())

ans = 0
for i in range(3,N+1):
    if i < 105:
        continue
    elif i%2 == 0:
        continue
    counter = 1
    n = math.floor(math.sqrt(i))
    for j in range(2,n+1):
        a = 0
        while i%j == 0:
            a += 1
            i /= j
        if a > 0:
            counter *= (a+1)
    if counter == 8:
        ans += 1
print(ans)

Solution (Python):
n=int(input())
ans=0
for num in range(1,n+1,2):
    cnt=0
    for i in range(1,num):
        if i*i>num:
            break
        if num%i==0:
            if num==i*i:
                cnt+=1
            else:
                cnt+=2
    if cnt==8:
        ans+=1
print(ans)

Solution (Python):


n = int(input())

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)

Solution (Python):
cand = [105, 135, 165, 189, 195]
k = int(input())
print(len([n for n in cand if n <= k]))

Solution (Python):
def f(n):
  if n < 105:
    return 0
  if n % 2 == 0:
    return 0
  c = 0
  for i in range(1, n + 1):
    if n % i == 0:
      c += 1
  if c == 8:
    return 1
  else:
    return 0

print(sum(map(lambda x:f(x), [x for x in range(1, int(input()) + 1)])))