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())
n = []
R = []
for i in range(N+1):
    if i % 2 != 0 and i != 1:
        n.append(i)
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr
for x in n:
    a = factorization(x)
    b = []
    for y in range(len(a)):
        b.append(a[y][1] + 1)
    import functools
    import operator
    result = functools.reduce(operator.mul, b)
    if result == 8:
        R.append(x)
print(len(R))

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
def input(): return sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()

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

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

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

    divisor_count = 0
    for j in range(2, i // 2):
        if i % j == 0:
            divisor_count += 1
    if divisor_count == 6:
        count += 1

print(count)

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):
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):
    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(raw_input())
ans = 0
for i in range(1, N+1):
    num = 0
    if i%2 != 0:
        for j in range(1, N+1):
            if i%j == 0:
                num = num + 1

        if num == 8:
            ans = ans + 1

print ans

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

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):
N=int(input())
def yakusu(n):
    y=set([n])
    for i in range(1, int(n//2)+1):
        if n%i==0:
            y.add(i)
    return len(y)
ans=0
for i in range(1,N+1,2):
    if yakusu(i)==8:
        ans+=1
print(ans)

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    n = I()
    f = [0]*(n+1)
    for i in range(1,n+1):
        j = i
        while j <= n:
            f[j] += 1
            j += i
    print(f[1::2].count(8))
    return


if __name__ == "__main__":
    solve()

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

ans = 0

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

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

print(ans)

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

print(ans)

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

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

Solution (Python):
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))+1):
    if i%j==0:
      if i//j==j:
        c+=1
      else:
        c+=2
  if c==8:
    ans += 1
print(ans)

Solution (Python):


import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda: float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda: list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

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

print(ans)

Solution (Python):
'''
制約 1< n< 200
'''
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())
ans=0
for i in range(1,n+1,2):
    count=0
    for j in range(1,i+1,2):
        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,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())

def yakusu(x):
    l = []
    for i in range(1, x+1):
        if x%i == 0:
            l.append(i)
    return l

count = 0
for i in range(1, n+1):
    A = yakusu(i)
    if len(A) == 8 and i%2 == 1:
        count += 1
        
print(count)

Solution (Python):
n = int(input())
odd = [i for i in range(1, n + 1) if i % 2 is not 0]
ans = [ii for ii in odd if len([x for x in range(1, ii + 1) if ii % x is 0]) == 8]
print(len(ans))

Solution (Python):

n = int(input())

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

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

    if cnt == 8:
        rst += 1

print(rst)

Solution (Python):
def count_divisor(n):
    a = 0
    for i in range(1, int(n ** 0.5) + 1):
        if n % i == 0:
            a += 1
            if i != n // i:
                a += 1
    return a

if __name__ == '__main__':
    n = int(input())
    c = 0

    for i in range(1, n + 1):
        if i % 2 == 0:
            continue
        if count_divisor(i) == 8:
            c += 1
    print(c)

Solution (Python):
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
    cnt = 0
    
print(ans)

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

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

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

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

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

ct=0
for n in range(1,N+1):
    if n%2!=0 and NumOfFractional(n)==8:
        ct+=1
print(ct)

Solution (Python):
def divisors(n: int) -> list:
    d = []
    for i in range(1, n + 1):
        q, r = divmod(n, i)
        if r == 0:
            d.append(i)
    return d


N = int(input())

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

print(ans)

Solution (Python):
def divCnt(n):
    cnt=0
    for i in range(1,n+1):
        if n%i==0:
            cnt+=1
    return cnt

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

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

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

print(ans)

Solution (Python):
N = int(input())
result = 0
target = 1
while target <= N:
    div, div_count = 1, 0
    while div <= N:
        if target % div == 0:
            div_count += 1
        div += 2
    if div_count == 8:
        result += 1
    target += 2
print(result)

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

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

Solution (Python):
def solve(x):
    if x%2==0:return False
    res = 0
    for i in range(x):
        if x%(i+1)==0:res += 1
    return res == 8
n = int(input())
ans = 0
for i in range(n):
    if solve(i+1):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())


def make_divisor(n):
    divisors = []
    if n % 2 == 0:
        return 0
    for i in range(1, int(n ** 0.5) + 1, 2):
        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 make_divisor(i) == 8:
        ans += 1
print(ans)

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

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

Solution (Python):


N = int(input())


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

print(result)

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

res = 0
for n in range(3,N+1,2):
    cnt = 0 
    for i in range(1,n+1):
        if n % i == 0:
            cnt += 1
        if cnt == 8:
            res += 1
print(res)

Solution (Python):
import math
N = int(input())
def yakusuu(N):
    P = [1,N]
    for k in range(2,math.floor(math.sqrt(N))+1):
        if N % k == 0:
            P.append(k)
            P.append(N//k)
    return len(set(P))
ans = 0
for k in range(1,N+1,2):
    if yakusuu(k) == 8:
        ans += 1
print(ans)

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

Solution (Python):


n = int(input())








l = [1,3*5*7,3**3*5,3*5*11,3**3*7,3*5*13,201]

for i in range(6):
    if l[i] <= n < l[i+1]:
        print(i)
        break

Solution (Python):
from collections import defaultdict
from math import sqrt
def primeFactors(n):
    d = defaultdict(int)
    while n % 2 == 0:
        d[2] += 1
        n = n // 2
    for i in range(3,int(sqrt(n))+1,2):
        while n % i == 0:
            d[i] += 1
            n = n // i
    if n > 2:
        d[n] += 1

    return d

if __name__ == '__main__':
    N = int(input())
    ans = 0
    for i in range(3, N+1, 2):
        d = primeFactors(i)
        num_of_factor = 1
        for _, v in d.items():
            num_of_factor = num_of_factor * (v + 1)
        if num_of_factor == 8:
            ans += 1

    print(ans)

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

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

    if tmp == 8:
        ans += 1

print(ans)

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

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

    if tmp == 8:
        ans += 1

print(ans)

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

Solution (Python):
MAX_N = 200
N = int(input())
a = [3, 5]
i = 7
while 3 * 5 * i < MAX_N:
  a.append(i)
  i += 2
len_a = len(a)
dot = []
for j in range(len_a-2):
  for k in range(j+1, len_a-1):
    for l in range(k+1, len_a):
      d = a[j] * a[k] * a[l]
      if d < MAX_N:
        dot.append(a[j] * a[k] * a[l])
dot = sorted(dot)
r = 0
for x in dot:
  if x <= N:
    r += 1
  else:
    break
print(r)

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

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

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

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):
import sys
input = sys.stdin.readline


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

print(cnt)

Solution (Python):
import math
import string


def readints():
    return list(map(int, input().split()))


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


def has_duplicates2(seq):  
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


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






n = int(input())


cnt = 0
for i in range(1, n+1):
    
    
    if i % 2 != 0 and len(divisor(i)) == 8:
        cnt += 1
print(cnt)

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):
def hantei(n):
    root_n = int(n**0.5 +0.5)
    
    if root_n**2 == n:
        return 0
    
    total = 0
    for i in range(1,root_n):
        if n % i == 0:
            total += 2
            
    return total
    
n = int(input())

total = 0
for i in range(1,n+1,2):
    if hantei(i) == 8:
        total += 1

print(total)

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


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):
    if len(make_divisors(i)) == 8:
        ans += 1
print(ans)

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

Solution (Python):
from collections import Counter
import sys

sys.setrecursionlimit(10 ** 6)

mod = 1000000007
inf = int(1e18)

dx = [0, 1, 0, -1]
dy = [1, 0, -1, 0]


def inverse(a):
    return pow(a, mod - 2, mod)


def usearch(x, a):
    lft = 0
    rgt = len(a) + 1
    while rgt - lft > 1:
        mid = (rgt + lft) // 2
        if a[mid] <= x:
            lft = mid
        else:
            rgt = mid
    return lft

def isOk(n):
    a = 0
    for i in range(1, n+1):
        if n % i == 0:
            a += 1
    return a == 8

def main():
    n = int(input())
    ans = 0
    for i in range(1, n+1):
        if i % 2 == 0:
            continue
        if isOk(i):
            ans += 1

    print(ans)



main()

Solution (Python):
n=int(input())
odd_list=list(range(1,n+1,2))

cnt=0
for i in odd_list:
    ind=0
    temp=0
    while True:
        if ind>=len(odd_list):break
        if i<odd_list[ind]:break
        if i%odd_list[ind]==0:temp+=1
        ind+=1
    if temp==8:
        cnt+=1

print(cnt)

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

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

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

cnt = 0
cnt_cnt = 0


for i in range(1,N+1):
  for j in range(1,i+1):
    if i%j == 0 and i%2 !=0:
      cnt += 1
  if cnt == 8:
    cnt_cnt += 1
  cnt = 0
  
print(cnt_cnt)

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

Solution (Python):
n = int(input())
ans = 0
for j in range(1,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] or div == [1,3] or div ==[3,1]:
    ans += 1
    
print(ans)

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

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

for i in range(1,n+1,2):
    if len(divs(i)) == 8:
        count += 1
print (count)

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

Solution (Python):
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

n = ii()

cnt = 0
for i in range(n,16,-1):
    if(i % 2 == 0):
        continue

    cnt2 = 0
    for j in range(3,i+1):
        if(i%j == 0):
            cnt2 +=1
    
    if cnt2 == 7:
        cnt += 1

print(cnt)

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

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)

    divisors.sort()
    return divisors
n=int(input())
if n<105:
    print(0)
    exit()
ans=1
for i in range(106,n+1):
    if i%2==0:
        continue
    l=make_divisors(i)
    if len(l)==8:
        ans+=1
print(ans)

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

ans = 0
for x in range(1, N + 1, 2):
    d = 0
    for y in range(1, int(x ** 0.5 + 0.5) + 1):
        if x % y == 0:
            d += 1
            if y * y != x:
                d += 1
    if d == 8:
        ans += 1

print(ans)

Solution (Python):
import sys
from math import *
from collections import deque, Counter, defaultdict
from fractions import gcd
input = lambda: sys.stdin.readline().rstrip()

def eprint(s):
    sys.stderr.write('DEBUG: {}'.format(s))
    return

"""
約数を全列挙する
"""

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

def main():
    n = int(input())
    cnt = 0

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

if __name__ == '__main__':
    main()

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

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

print(ans)

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

Solution (Python):
import sys

import numpy as np
import math, string, itertools, fractions, heapq, collections, re, array, bisect, copy, functools, random
from collections import deque, defaultdict, Counter
from heapq import heappush, heappop
from itertools import permutations, combinations, product, accumulate, groupby
from bisect import bisect_left, bisect_right, insort_left, insort_right
from operator import itemgetter as ig
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
INF = float("INF")
mod = 10 ** 9 + 7
"""dd = [(-1, 0), (0, 1), (1, 0), (0, -1)];
ddn = dd + [(-1, 1), (1, 1), (1, -1), (-1, -1)];
ddn9 = ddn + [(0, 0)]
for dx, dy in dd:
        nx = j + dx; ny = i + dy
            if 0 <= nx < w and 0 <= ny < h:"""

def wi(): return list(map(int, sys.stdin.readline().split()))
def wip(): return [int(x) - 1 for x in sys.stdin.readline().split()]  
def ws(): return sys.stdin.readline().split()
def si(): return int(sys.stdin.readline())  
def ss(): return input()
def hi(n): return [si() for _ in range(n)]
def hs(n): return [ss() for _ in range(n)]  
def s_list(): return list(input())
def mi(n): return [wi() for _ in range(n)]  
def mip(n): return [wip() for _ in range(n)]
def ms(n): return [ws() for _ in range(n)]
def num_grid(n): return [[int(i) for i in sys.stdin.readline().split()[0]] for _ in range(n)]  
def grid(n): return [s_list() for _ in range(n)]


def main():
    n = int(input())
    count = 0
    for i in range(1,n+1):
        if i % 2 != 0:
            ans = 0
            for j in range(1,i+1):
                if i % j == 0:
                    ans += 1
            if ans == 8:
                count += 1
        else:
            continue

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

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

a =[]

for i in range(1,n+1):
  if i % 2 == 1:
    a.append(i)
    
ans = 0
for j in a:
  x=0
  for k in range(1,j+1):
    if j % k == 0:
      x += 1
    if x ==8:
      ans += 1
    else:
      continue
      
      
print(ans)

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

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 == 1 and len(make_divisors(i)) == 8:
    ans += 1
print(ans)

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

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

    else:
        cnt=0
        continue
print(ans)

Solution (Python):


N = int(input())
def div(n):
    cnt = 0
    N = n
    for i in range(1,N+1):
        if n % i == 0:
            cnt += 1
    if cnt == 8:
        return True
    else:
        return False

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

print(ans)

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

count = 0
for n in range(1, N + 1):
  if (n % 2 == 0):
    continue
  m_count = 0
  for m in range(1, n + 1):
    if (n % m == 0):
      m_count += 1
  
  if (m_count == 8):
    count += 1

print(count)

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

def div(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

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

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

    def sieve(n):
        prime=[]
        limit=n**0.5
        data=[i+1 for i in range(1,n)]
        while True:
            p=data[0]
            if limit<=p:
                return prime+data
            prime.append(p)
            data=[e for e in data if e%p!=0]
    
    primes=sieve(n+1)
    cnt=0
    for num in range(1,n+1,2):
        cnt_factor=1
        for p in primes:
            c=0
            while num%p==0:
                num//=p
                c+=1
            if c!=0:
                cnt_factor*=(c+1)
        if cnt_factor==8:
            cnt+=1
    print(cnt)
    
if __name__=='__main__':
    main()

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

counter = 0  

for i in range(1, n+1):
  if i%2!=0 and len([j for j in range(1,i+1) if i%j==0])==8:
    counter += 1
    
print(counter)

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

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

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

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

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

Solution (Python):



import sys
input = sys.stdin.readline
MOD = 10**9 + 7
INF = float('INF')

def main():
    n = int(input())
    ans = 0

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

    print(ans)

if __name__ == '__main__':
    main()

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

def factors(i):
    ans = []
    for j in range(1, i + 1):
        if i % j == 0:
            ans.append(j)
    return ans

count = 0
for i in range(3, N + 1, 2):
    fi = factors(i)
    
    if len(fi) == 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 len(divisors)

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

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

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

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