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

def main():
    a = 0
    for i in range(1,n+1):
        c = 0
        if i %2 != 0:
            for j in range(1,i+1):
                if i % j == 0:
                    c += 1
            if c == 8:
                a += 1
                
    return a

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

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


l = list(range(n + 1))[1::2]

num = 0
for i in l:
    if len(make_divisors(i)) == 8:
        num += 1

print(num)

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

def 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

counter = 0
for n in range(1, N+1):
    if len(divisors(n)) == 8 and n % 2 == 1:
        counter += 1
print(counter)

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

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
if N < 105:
  pass
else:
  for i in range(105, N+1, 2):
    cnt = 0
    for j in range(1, N+1):
      if i % j == 0:
        cnt += 1
    if cnt == 8:
      ans += 1
      
print(ans)

Solution (Python):
from sys import stdin

N = int(stdin.readline().rstrip())

sosuu = [3, 5, 7, 11, 13]

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):
    count = 0
    for j in range(1,n+1,2):
        if i%j == 0:
            count += 1
    if count == 8:
        ans += 1
print(ans)

Solution (Python):

"""
B - 105
https://atcoder.jp/contests/abc106/tasks/abc106_b

"""
import sys


def divisor(N):
    divisors = set()
    for i in range(1, int(N**0.5)+1):
        if N % i == 0:
            divisors.add(i)
            divisors.add(N // i)
    return divisors


def solve(N):
    ans = 0
    for i in range(1, N+1, 2):
        if len(divisor(i)) == 8:
            ans += 1
    return ans


def main(args):
    N = int(input())
    ans = solve(N)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

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

print(result)

Solution (Python):
def factor(x):
    ans = []
    for i in range(1, x+1):
        if x % i ==0:
            ans.append(i)
    return sorted(ans)
n = int(input())
count = 0
if n < 105:
    print(count)
else:
    for i in range(105, n+1,2):
        if len(factor(i))==8:
            count +=1
    print(count)

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

count = 0
for i in range(1, N+1, 2):
    ylist = make_divisors(i)
    if len(ylist) == 8:
        count += 1

print(count)

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

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(n):
    if (i+1) % 2 != 0: 
        divisors = make_divisors(i+1)
        if len(divisors) == 8:
            count += 1

print(count)

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())
counter = 0
for i in range(1,n+1):
  if i %2 == 1 and len(make_divisors(i)) == 8:
    counter += 1
    
print(counter)

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

if N < 105:
    print(0)
    exit()
cnt = 1
for i in range(107, N+1, 2):
    divisors = make_divisors(i)
    if len(divisors) == 8:
        cnt += 1
print(cnt)

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

a = int(input())
count = 0
for i in range(a+1):
    b = make_divisors(i)
    if len(b) == 8 and i % 2 != 0:
        count += 1
print(count)

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

Solution (Python):
N = int(input())
cd = [0] * (N // 2 + 1)
for i in range(1, N+1, 2):
    for j in range(i, N+1, 2):
        if j % i == 0:
            cd[j // 2] += 1
print(cd.count(8))

Solution (Python):
N = int(input())
cd = [0] * N
for i in range(1, N+1):
    for j in range(i, N+1):
        if j % i == 0:
            cd[j-1] += 1
print(cd[::2].count(8))

Solution (Python):

def make_divisors(n):
    divisors = []
    for i in range(1, int((n**0.5)+1)):
        if n % i == 0:
            divisors.append(n)
            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):
n=int(input())
cc = 0
for i in range(1, n+1, 2):
    c = 0
    for j in range(1, i+1, 2):
        if i % j == 0:
            c += 1
        if c > 8:
            break
    if c == 8:
        cc += 1
print(cc)

Solution (Python):


from sys import stdout
from bisect import bisect_left as binl
from copy import copy, deepcopy
from collections import defaultdict


mod = 1


def intin():
    input_tuple = input().split()
    if len(input_tuple) <= 1:
        return int(input_tuple[0])
    return tuple(map(int, input_tuple))


def intina():
    return [int(i) for i in input().split()]


def intinl(count):
    return [intin() for _ in range(count)]


def modadd(x, y):
    global mod
    return (x + y) % mod


def modmlt(x, y):
    global mod
    return (x * y) % mod


def lcm(x, y):
    while y != 0:
        z = x % y
        x = y
        y = z
    return x


def combination(x, y):
    assert(x >= y)

    if y > x // 2:
        y = x - y

    ret = 1

    for i in range(0, y):
        j = x - i
        i = i + 1

        ret = ret * j
        ret = ret // i

    return ret


def get_divisors(x):
    retlist = []
    for i in range(1, int(x**0.5) + 3):
        if x % i == 0:
            retlist.append(i)
            retlist.append(x // i)
    return retlist


def get_factors(x):
    retlist = []
    for i in range(2, int(x**0.5) + 3):
        while x % i == 0:
            retlist.append(i)
            x = x // i
    retlist.append(x)
    return retlist


def make_linklist(xylist):
    linklist = {}
    for a, b in xylist:
        linklist.setdefault(a, [])
        linklist.setdefault(b, [])
        linklist[a].append(b)
        linklist[b].append(a)
    return linklist


def calc_longest_distance(linklist, v=1):
    distance_list = {}
    distance_count = 0
    distance = 0
    vlist_previous = []
    vlist = [v]
    nodecount = len(linklist)

    while distance_count < nodecount:
        vlist_next = []
        for v in vlist:
            distance_list[v] = distance
            distance_count += 1
            vlist_next.extend(linklist[v])
        distance += 1
        vlist_to_del = vlist_previous
        vlist_previous = vlist
        vlist = list(set(vlist_next) - set(vlist_to_del))

    max_distance = -1
    max_v = None
    for v, distance in distance_list.items():
        if distance > max_distance:
            max_distance = distance
            max_v = v

    return (max_distance, max_v)


def calc_tree_diameter(linklist, v=1):
    _, u = calc_longest_distance(linklist, v)
    distance, _ = calc_longest_distance(linklist, u)
    return distance





def main():
    n = intin()

    count = 0

    for i in range(1, n + 1):
        divs = get_divisors(i)
        divs = set(divs)
        if i % 2 and len(divs) == 8:
            count += 1

    print(count)


if __name__ == '__main__':
    main()

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

Solution (Python):
N = int(input())
ans = 0
for i in range(1,N+1):
  cnt = 0
  for j in range(1,N+1,2):
    if i%j == 0:
      cnt+=1
  if cnt == 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, N+1):
    if i%j == 0:
      count += 1
  if count == 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, N+1, 2):
        if i%j == 0:
            count += 1

    if count == 8:
        ans += 1

print (ans)

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

if N < 105:
    print (0)
else:
    if N < 135:
        print (1)
    else:
        if N < 165:
            print (2)
        else:
            if N < 189:
                print (3)
            else:
                if N < 195:
                    print (4)
                else:
                    print (5)

Solution (Python):
import math
def num_divisors_trial_division(n):
    num = 0
    for i in range(1, int(math.sqrt(n) + 1e-9) + 1):
        if n % i == 0:
            num += 1
            if n != i**2:
                num += 1
    
    return num

N = int(input())
if N == 105:
    print("1")
    exit()
elif N < 105:
    print("0")
    exit()
lists = []
cnt = 1
for i in range(106,N+1):
    if i % 2 == 1:
        if num_divisors_trial_division(i) == 8:
            cnt += 1
print(cnt)

Solution (Python):
n = int(input())
if n<105:
  print(0)
  exit()

ans = 1
for i in range(107, 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):
def main():
    n = int(input())
    ans = 0
    count = 0
    for i in range(1,n+1,2):
        count = 0
        for j in range(1, n+1, 2):
            if i%j == 0:
                count += 1
        if count == 8:
            ans += 1
    print(ans)


if __name__=='__main__':
    main()

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):

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):








N = int(input())
nums = [105, 135, 165, 189, 195]

ans = 0
for i in nums:
    if i <= N:
        ans += 1
    else:
        break

print(ans)

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

count = 0
for n in range(1, N+1, 2):
    count_fact = 0
    for i in range(1, n+1):
        if n%i == 0:
            count_fact += 1
    else:
        if count_fact == 8:
            count += 1

print(count)

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

Solution (Python):
N=int(input())
A=[]
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:
        A.append(i)
print(len(A))

Solution (Python):
n = int(input())
ans = 0
a =[]
for i in range(1,n+1):
  if i%2 == 1:
    a.append(i)
for i in a:
  cnt = 0
  for j in range(1,max(a)+1):
    if i%j == 0:
      cnt +=1
  if cnt == 8:
    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())

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

Solution (Python):
n = int(input())
match = [105, 135, 165, 189, 195]
ans = 0

for i in match:
    if n >= i:
        ans += 1
print(ans)

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

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

Solution (Python):
from math import sqrt,ceil
N=int(input())
if N<105:
    print("0")
    exit()
ans=0
for n in range(105,N+1):
    cnt=0
    if n%2==0:
        continue
    for i in range(1,ceil(sqrt(n))):
        if n%i==0:
            cnt+=1
    if cnt==4:
        ans+=1
print(ans)

Solution (Python):
from math import sqrt,ceil
N=int(input())
if N<105:
    print("0")
    exit()
ans=0
for n in range(105,N+1):
    cnt=0
    if n%2==0:
        continue
    for i in range(1,n+1):
        if n%i==0:
            cnt+=1
    if cnt==8:
        ans+=1
print(ans)

Solution (Python):
import math

N = int(input())

ans = 0
for n in range(1, N + 1):
    if n % 2 != 0:
        yaku = 0
        for m in range(1, n + 1):
            if n % m == 0:
                yaku += 1

        if yaku == 8:
            ans += 1

print(ans)

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):
n = int ( input())
ans = 0
test = (3,5,7,11,13)
for i in range ( 105,n+1,2) :
  div = 0
  for d in test :
    if i % d == 0 :
      div += 1
  if div == 3 and i % 9 != 0:
    ans += 1
  elif i % 27 == 0:
    ans += 1
print (ans)

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):
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):
n=int(input())
a=[i for i in range(n+1) if i%2==1]
def cal(k):
  num=0
  for l in range(1,k+1):
    if k%l==0:
      num+=1
  return num
    
ans=0
for j in range(len(a)):
  if cal(a[j])==8:
    ans+=1
print(ans)

Solution (Python):
def divisors(x):
    c = 0
    for i in range(1, x+1):
        if x % i == 0:
            c += 1

    return c


n = int(input())
count = 0
for m in range(1, n+1):
    if m % 2 == 0:
        continue

    if divisors(m) == 8:
        count += 1

print(count)

Solution (Python):
def cnt_factor(n):
    if (n ** 0.5) % 1 == 0:
        return 0
    c = 0
    for d in range(1, int(n ** 0.5) + 1):
        if n % d == 0:
            c += 1
    return c * 2


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

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

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

print(eight_number)

Solution (Python):
from functools import reduce


def prime_factor(n):
  if n == 1:
    return [(1, 1)]
  results = []
  for i in range(2, n + 1):
    if n % i == 0:
      c = 0
      while n % i == 0:
        n //= i
        c += 1
      results.append((i, c))
  return results


def count_divisors(n):
  pf = prime_factor(n)
  return reduce(lambda x, y: x * y, [x[1] + 1 for x in pf])


if __name__ == "__main__":
  N = int(input())
  count = 0
  for i in range(1, N + 1, 2):
    if count_divisors(i) == 8:
      count += 1

  print(count)

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

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

Solution (Python):
import sys
import math
def search_divisor_num_1(num):
    if num < 0:
        return None
    elif num == 1:
        return 1
    else:
        num_sqrt = math.floor(math.sqrt(num))
        prime_list = make_prime_list_2(num_sqrt)

        divisor_num = 1
        for prime in prime_list:
            count = 1
            while num % prime == 0:
                num //= prime
                count += 1
            divisor_num *= count

        if num != 1:
            divisor_num *= 2

        return divisor_num

def make_prime_list_2(num):
    if num < 2:
        return []

    
    prime_list = [i for i in range(num + 1)]
    prime_list[1] = 0 
    num_sqrt = math.sqrt(num)

    for prime in prime_list:
        if prime == 0:
            continue
        if prime > num_sqrt:
            break

        for non_prime in range(2 * prime, num, prime):
            prime_list[non_prime] = 0

    return [prime for prime in prime_list if prime != 0]
    
n = int(input())
count =0
for i in range(1,n+1,2):
    tmp = search_divisor_num_1(i)
    if tmp == 8:
        count+=1
print(count)

Solution (Python):
n=int(input())
ans=0
for j in range(1,n+1,2):
    l=[]
    for i in range(1,j+1):
        if j%i==0:
            l.append(j//i)
    if len(l)==8:
        ans+=1
print(ans)

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

Solution (Python):
def yakusu(a):
    c = 0
    for i in range(1,a+1):
        if a%i==0:
            c += 1
    return c
n=int(input())
m=0
for i in range(1,n+1):
    if i%2==1 and yakusu(i)==8:
        m += 1
print(m)

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())
ans = 0
for i in range(1, N+1):
    if i % 2 == 0:
        continue
    tmp = make_divisors(i)
    if len(tmp) == 8:
        ans += 1
print(ans)

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


def divisor(n):
  result = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      result.append(i)
      if i != n // i:
        result.append(n//i)
  return result

count = 0
for j in range(1,N+1):
  if j % 2 == 0:
    continue
  if len(divisor(j)) == 8:
    count += 1
print(count)

Solution (Python):

N = int(input())

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

print(ans)

Solution (Python):
def divisorize(fct):
    b, e = fct.pop()  
    pre_div = divisorize(fct) if fct else [[]]
    suf_div = [[(b, k)] for k in range(e + 1)]
    return [pre + suf for pre in pre_div for suf in suf_div]


def factorize(n):
    fct = []  
    b, e = 2, 0  
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct


def num(fct):
    a = 1
    for base, exponent in fct:
        a = a * base**exponent
    return a

n=int(input())
C=[]
cnt=0
for i in range(3,n+1,2):
    fct = factorize(i)
    for div in divisorize(fct):
        C.append(num(div))
    if len(C)==8:
        cnt+=1
    C=[]
print(cnt)

Solution (Python):
N = int(input())
if N >= 3*5*13:
    ans = 5
elif N >= 3*7*9:
    ans = 4
elif N >= 3*5*11 :
    ans = 3
elif N >= 3*5*9 :
    ans = 2
elif N >= 3*5*7 :
    ans = 1
else:
    ans = 0

print(ans)

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

ans = 0

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

print(ans)

Solution (Python):
n = int(input())
l = []
cnt = 0

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

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

O=[]
for i in range(1,N+1):
  if i%2 == 1:
    O.append(i)
  else:
    continue

c = 0
for i in O:
  a = 1
  b = 0
  while a <= i:
    if i%a == 0:
      b += 1
      a += 1
    else:
      a += 1
  if b == 8:
    c += 1
  else:
    continue
    
print(c)

Solution (Python):

import sys
from math import *
from itertools import *
from collections import *
from functools import *
try:
    from math import gcd
except Exception:
    from fractions import gcd


def solve(N: int):
    ret = 0
    for i in range(1, N + 1 , 2):
        c = 0
        for j in range(1, i + 1):
            c += int((i % j) == 0)

        if c == 8:
            ret += 1
    return ret


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    result = solve(N)
    print(result)

if __name__ == '__main__':
    main()

Solution (Python):
import numpy as np

a = np.zeros(201)
for d in range(1,201,2):
  a[d::2*d] += 1

a = (a == 8).cumsum()

N = int(input())
print(a[N])

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

    
    return len(divisors)
ans=0
for i in range(1,N+1):
        if i%2==0:
                continue
        else:
                u=make_divisors(i)
                if u==8:
                        ans+=1
print(ans)

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 % int(j) == 0:
            cnt = cnt + 1
    
    if cnt == 8:
        ans = ans + 1
print(ans)

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

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

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

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)

    
    return divisors


cnt = 0

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

print(cnt)

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 calc_divisor(x):
  res = 0
  for i in range(1,x+1):
    if x % i == 0:
      res += 1
  return res

N = int(input())
ans = 0
for i in range(1,N+1):
  if i % 2 == 1 and calc_divisor(i) == 8:
    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
ans=[]
for ii in range(1,int(input())+1):
	if len(make_divisors(ii))==8 and ii%2==1:
		ans.append(ii)
print(len(ans))

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):
N = int(input())
ans = 0
tmp = 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):

def main():
    a = int(input())
    ans = 0
    for now_num_kari in range(105, a + 1)[::2]:
        data = []
        now_num = now_num_kari
        for i in range(2, 50):
            count = 0
            while now_num % i == 0:
                count += 1
                now_num //= i
            if count > 0:
                data.append(count)

        if now_num > 1:
            data.append(1)

        yakusuu = 1
        for ele in data:
            yakusuu *= (ele + 1)

        if yakusuu == 8:
            ans += 1

    print(ans)


if __name__ == '__main__':
    main()

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

Solution (Python):

import sys

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

def solve(N: int):
    ret = 0
    for i in range(1, N + 1):
        if i % 2 == 1 and count_f(i) == 8:
            ret += 1
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    solve(N)

if __name__ == '__main__':
    main()

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):
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 and i%2==1:
            cnt+=1
    if cnt==8:
        ans+=1
print(ans)

Solution (Python):
def f(n):
    a = []
    for i in range(1,n+1):
        if n%i == 0:
            a.append(i)
    return a

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

Solution (Python):
N = int(input())
"""200以下の奇数で約数8個→3*5*7,3^3*5=135,3^3*7=189,3*5*11=165,3*5*13=195"""
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())
odd = []
odd_divs = []

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

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

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

else:
    for i in range(105, N+1, 2):
        for j in range(1, N+1):
            if i % j == 0:
                temp += 1

        if temp == 8:
            ans += 1
            temp = 0
        else:
            temp = 0

print(ans)

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

Solution (Python):
import sys

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

Solution (Python):
def divide(h):
    counter = 0
    counter1 = 0
    for i in range(1, h, 2):
        for j in range(1, i+1):
            if i % j == 0:
                counter += 1
        if counter == 8:
            counter1 += 1
        counter = 0
    return counter1

                         
if __name__ == '__main__':
    n = int(input())
    if n % 2 != 0:
        print(divide(n+1))
    else:
        print(divide(n))

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

ans = 0
for i in range(1, N+1, 2):
  d = make_divisors(i)
  if len(d) == 8:
    ans += 1
print(ans)

Solution (Python):
def divide(n):
    counter = 0
    counter1 = 0
    if n % 2 != 0:
        for i in range(1, n+1, 2):
            for j in range(1, i+1):
                if i % j == 0:
                    counter += 1
            if counter == 8:
                counter1 += 1
            counter = 0
    else:
        for i in range(1, n, 2):
            for j in range(1, i+1):
                if i % j == 0:
                    counter += 1
            if counter == 8:
                counter1 += 1
            counter = 0
    return counter1

                         
if __name__ == '__main__':
    n = int(input())
    print(divide(n))

Solution (Python):
N = int(input())
oddprime = []
for i in range(3, N + 1, 2):
  com = False
  for p in oddprime:
    if p > i ** 0.5:
      break
    if i % p == 0:
      com = True
      break
  if not com:
    oddprime.append(i)

count = 0
for i in range(1, N + 1, 2):
  yaku_num = 1
  for j in oddprime:
    div_num = i
    div_count = 0
    while div_num % j == 0:
      div_count += 1
      div_num //= j
    yaku_num *= (div_count + 1)
  if yaku_num == 8:
    count += 1
print(count)

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):
ans=0
for i in range(105,int(input())+1,2):
    x=1
    for j in range(3,int(i**0.5)+1,2):
        if j**2==i:break
        elif i%j==0:
            x+=1
    else:
        if x==4:ans+=1
print(ans)