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

import fractions

N = int(input())


def is_8(num):
    if num < 1:
        return False
    elif num == 1:
        return False
    else:
        divisor_list = []
        divisor_list.append(1)
        for i in range(2, num // 2 + 1):
            if num % i == 0:
                divisor_list.append(i)
        divisor_list.append(num)
        if len(divisor_list) == 8:
            return True

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

print(cnt)

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

    
    return cnt

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

Solution (Python):
n = int(input())
def F(n):
    count = 0
    for i in range(1,n+1):
        if n % i == 0:
            count += 1
    return count

ans = 0

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

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

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

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

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

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

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

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

result = [1] * (N + 1)

for i in range(2, N + 1):
    result[i] += 1
    temp = 2
    while temp * i <= N:
        result[temp * i] += 1
        temp += 1

hoge = 0
for i, v in enumerate(result):
    if (i % 2) == 1 and v == 8:
        hoge += 1

print(hoge)

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

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

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

n=int(input())
ans=[]
for i in range(1,n+1,2):
    if len(make_divisors(i))==8:
        ans.append(i)
print(len(ans))

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 % 2 == 0:
            break
        else:
            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):
    cnt=0
    for j in range(1,i+1):
        if i%2==0:
            break
        else:
            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 == 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())
l = []
cnt = 0
odd = []
for j in range(1,n+1):
    if j % 2 == 1:
        odd.append(j)
for k in odd:
    l = []
    for s in range(1,k+1):
        if k % s == 0:
            l.append(s)
        if len(l) == 8:
            cnt += 1
print(cnt)

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

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

print(res)

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

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

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, int(i**(0.5))+1):
            if i % j == 0:
                count += 2
        if (int(n**0.5))**2 == n:
            count -= 1
        if count == 8:
            ans += 1

print(ans)

Solution (Python):
N = int(input())
lis = [i for i in range(2,N+1) if i%2 == 1]
ans2=0
check =0
for one in lis:
    Prime = []
    count=[]
    t = 0
    ans1 =1
    for k in range(2,one+1):
        while(one % k)==0:
            one //= k
            if(k in Prime):
                count[Prime.index(k)]+=1
            else:
                Prime.append(k)
                count.append(1)
                t +=1
    for j in range(0,t):
        ans1 *= (count[j] + 1)
    if(ans1 == 8):
        ans2 +=1
print(ans2)

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

count = 0
for i in range(N):
    divisor_count = 0
    for j in range(i + 1):
        
        if (j + 1) % 2 == 0:
            continue
        if (i + 1) % (j + 1) == 0:
            divisor_count += 1
    if divisor_count == 8:
        count += 1
print(count)

Solution (Python):

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

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())
count = 0
ans = 0
j = 1

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

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

count = 0

if(n >= 105):
    for i in range(105, n+1, 2):
        l = []
        for j in range(1, i+1):
            if (i % j == 0):
                l += [j]
        if(len(set(l)) == 8):
            count += 1

print(count)

Solution (Python):
import math

n = int(input())
ans = 0
for i in range(105, n+1, 2):
    cnt = 0
    for j in range(2, int(math.sqrt(i-1))+1):
        
        if i % j == 0:
            cnt += 1
    if cnt == 3:
        ans += 1
print(ans)

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

count = 0
n = int(input())
for i in range(1,n+1):
    if i % 2 == 1:
        num_list = factorization(i)
        sum = 1
        for num in num_list:
            sum *= (num[1]+1)
        if sum == 8:
            count += 1
print(count)

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

odd = list()

count_list = list()
count = 0

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

l = len(odd)

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

print(len(list(filter(lambda x: x == 8, count_list))))

Solution (Python):
def main():
    
    n = int(input())
    if n < 105:
        print(0)
        return

    cnt = 1

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

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

        
        if tmp_cnt == 6:
            cnt += 1

    print(cnt)


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

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

def main():
    N = int(input())
    ans = 0
    for n in range(1, N+1, 2):
        
        
        ans += (len(make_divisors(n)) == 8)
    
    print(ans)


if __name__ == "__main__":
    main()

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

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

Solution (Python):
n = int(input())
c = 0
a = [105,165,195]
if (n<105):
    print(0)
elif (105<=n and n<135):
    print(1)
elif (n >= 195):
    print(5)
elif (135<=n and n<165):    
    print(2)
elif (165<=n and n<189):
    print(3)
else:
    print(4)

Solution (Python):
import math

n = int(input())

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

print(ans)

Solution (Python):
def count_div(n):
  res = 0
  for i in range(1, n + 1):
    if n % i == 0:
      res += 1
  return res
n = int(input())
ans = 0
for i in range(1, n + 1, 2):
  if count_div(i) == 8:
    ans += 1
print(ans)

Solution (Python):
import math
def countYakusu(n):
  count = 0
  for i in range(n):
    if n % (i+1) == 0:
      count = count + 1


  return count == 8

N = int(input())
count = 0
for i in range(math.ceil(N/2)):
  count = count + countYakusu(i*2+1)

print(count)

Solution (Python):


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

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

    print(cnt)

if __name__ == '__main__':
    main()

Solution (Python):
s=int(input())
def sosuu(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
c=0
for j in range(1,s+1,2):
  a=sosuu(j)
  b=1
  for i in range(len(a)):
    b *= (a[i][1]+1)
  if b==8:
    c+=1
print(c)

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

Solution (Python):

import sys


def cnt(n: int):
    i = 1
    ans = 0
    while i * i < n:
        if n % i == 0:
            ans += 1
        i += 1
    ans *= 2
    if i * i == n:
        ans += 1
    return ans


def solve(N: int):
    print(sum(1 for i in range(1, N + 1, 2) if cnt(i) == 8))


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

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

print(sum(1 for i in range(1,N+1) if i % 2 >0 and f(i)==8))

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


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


ans = 0

for i in range(1, n+1):
    if i % 2 == 1 and count_divisors(i) == 8:
        ans = ans + 1

print(ans)

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

ans = 0
for n in range(1, N+1, 2):
    num = 0
    for m in range(1, n+1):
        num += n % m == 0
    ans += num == 8

print(ans)

Solution (Python):
N = int(input())
def yaku(n):
    cnt = 0
    for k in range(1,n+1):
        if n%k==0:
            cnt += 1
    return cnt

cnt = 0
for n in range(1,N+1):
    if n%2==1 and yaku(n)==8:
        if yaku(n)==8:
            cnt += 1

print(cnt)

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

print(ans)

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

Solution (Python):
A=[105,135,165,189,195]
cnt=0
n=int(input())
for a in A:
    if a<=n:
        cnt+=1
print(cnt)

Solution (Python):

"""
https://atcoder.jp/contests/abc106/tasks/abc106_b
"""

def solve():
    N = int(input())

    def count_divisor(n):
        """nの約数を数える"""
        cnt = 0
        i = 1
        while i*i <= n:
            if n%i == 0:
                cnt += 1
                if i != n//i:
                    cnt += 1
            i += 1
        return cnt

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


if __name__ == "__main__":
    solve()

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
ans = 0
for i in range(-(-N//2)+1):
	cnt = 0
	for j in range(1, 2*i):
		if (2*i-1) % j == 0:
			cnt += 1

	if cnt == 8:
		ans += 1

print(ans)

Solution (Python):

N = int(input())
ans = 0


def Num_divisor(N):
    divisors = []
    for i in range(1,N):
        
        if i * i > N:
            break
        if ( N % i == 0):
            
            B = N / i
            
            if B == i :
                divisors.append(B)
            else:
                divisors.append(B)
                divisors.append(i)
    return len(divisors)

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

print(ans)

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


res = []
N = int(input())
for i in range(1, N + 1):
    if i % 2 == 0:
        continue
    else:
        r = make_divisors(i)
        if len(r) == 8:
            res.append(i)
print(len(res))

Solution (Python):
n = int(input())
cnt = 0
lista = [0] * (n + 1)
for i in range(1, n + 1, 2):
    c = 1
    for j in range(1, i, 2):
        if i % j == 0:
            c += 1
    if c == 8:
        cnt += 1
print(cnt)
"""

for i in range(1, n + 1, 2):
    
    for j in range(i, n + 1, 2 * i):
        lista[j] += 1
for i in range(n + 1):
    if lista[i] == 8:
        cnt += 1
print(cnt)
"""

Solution (Python):
n = int(input())
cnt = 0
lista = [0] * (n + 1)

for i in range(1, n + 1, 2):
    
    for j in range(i, n + 1, 2 * i):
        lista[j] += 1
for i in range(n + 1):
    if lista[i] == 8:
        cnt += 1
print(cnt)

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

ans = 0
for n in range(1, N+1, 1):
    count = 0
    if n%2==0:
        continue
    for i in range(1, int(n**0.5)+1):
        if n%i==0:  
            count = count + 2
    if count==8:
        ans = ans + 1

print(ans)

Solution (Python):
"""nを素因数分解"""
"""2以上の整数n => [(素因数, 指数), ...]の2次元リスト"""


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(n**0.5)+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

n = int(input())
k = 0
for j in range(1, n+1):
    if j%2==1:
        li = factorization(j)
        l = []
        for (x, y) in li:
            l.append(y)
        count = 1
        for i in l:
            count *= i+1
        if count == 8:
            k += 1
print(k)

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

Solution (Python):
from statistics import median


from itertools import combinations 
from collections import deque
from collections import defaultdict
import bisect










import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def main():
    n = int(input())
    if n < 105:
        print(0)
        exit()
    i = 105
    ans = 0
    while i <= n:
        if i % 2 == 0:
            i += 1
            continue
        cnt = 0
        a = 1
        while a * a <= i:
            if i % a == 0:
                if i // a == a:
                    cnt += 1
                else:
                    cnt += 2
            a += 1
        
        if cnt == 8:
            ans += 1
        i += 1
    print(ans)
if __name__ == '__main__':
  main()

Solution (Python):
import math
import itertools
import numpy as np

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

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

if __name__ == "__main__":
    solve()

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

Solution (Python):
def input_number():
    return int(input())

def is_odd(number):
    if number % 2 == 1:
        return True
    else:
        return False

def is_8(number):
    fraction_of_the_number = 0
    for i in range(1, int(number**0.5) + 1, 2):
        if number % i == 0:
            fraction_of_the_number += 2
    if fraction_of_the_number == 8 and is_odd(number):
        return True
    else:
        return False

def main():
    n = input_number()
    answer = 0
    for i in range(1, n+1, 2):
        if is_8(i):
            answer += 1
    print(answer)

main()

Solution (Python):
import math

def input_number():
    return int(input())

def is_odd(number):
    if number % 2 == 1:
        return True
    else:
        return False

def is_8(number):
    fraction_of_the_number = 0
    for i in range(1, int(math.sqrt(number)) + 1, 2):
        if number % i == 0:
            fraction_of_the_number += 2
    if fraction_of_the_number == 8 and is_odd(number):
        return True
    else:
        return False

def main():
    n = input_number()
    answer = 0
    for i in range(1, n+1, 2):
        if is_8(i):
            answer += 1
    print(answer)

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

def has_eight_div(N):

    if 8 == len(make_divisors(N)) and N%2==1:
        return 1
    return 0

N = int(input())
ans = 0
for i in range(N+1):
    ans += has_eight_div(i)
print(ans)

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

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())
B = 0
for i in range(N):
  A = 0
  n = int((i+1)**(1/2))
  for j in range(n):
     if (i+1) % (j+1) == 0:
        A += 1
  if A == 4 and (i+1) % 2 == 1:
    B += 1
print(B)

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

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

ans = 0

for i in range(105, n + 1, 2):
    divisor = []
    for j in range(1, int(i ** 0.5) + 1):
        if i % j == 0:
            divisor.append(j)
            divisor.append(i // j)

    if len(divisor) == 8:
        ans += 1

print(ans)

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

Solution (Python):
n=int(input())
a = 0
for x in range(1,n+1):
    if x%2 == 0: continue
    else:
        b=0
        for y in range(1,x+1):
            if x%y ==0:
                b+=1
        if b>= 8: a+=1
        
print(a)

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

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

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

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

ans = 0
for i in range(1, N + 1):
    res = 0
    for q in range(1, N + 1):
        if i % 2 != 0:
            if i % q == 0:
                res += 1
    if res == 8:
        ans += 1

print(ans)

Solution (Python):
def divisor(n):
    ass = []
    for i in range(1,int(n**0.5)+1):
        if n%i == 0:
            ass.append(i)
            if i**2 == n:
                continue
            ass.append(n//i)
    return ass 

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

Solution (Python):
n = int(input())
ans = 0
if n >= 195:
    ans += 1
if n >= 165:
    ans += 1
if n >= 189:
    ans += 1
if n >= 135:
    ans += 1
if n >= 105:
    ans += 1
print(ans)

Solution (Python):


N = int(input())
N_MAX = 200
prime = [1 for i in range(N_MAX+1)]
prime[0], prime[1] = 0, 0
for i in range(2, N_MAX+1):
    if prime[i] == 1:
        for j in range(2*i, N_MAX+1, i):
            prime[j] = 0
prime[2] = 0
ps = []
for i in range(N_MAX+1):
    if prime[i] == 1:
        ps.append(i)
pl = len(ps)
ans = 0
for i in range(pl):
    for j in range(i+1, pl):
        if (ps[i]**3)*ps[j] <= N or ps[i]*(ps[j]**3) <= N:
            ans += 1
        for k in range(j+1, pl):
            if ps[i]*ps[j]*ps[k] <= N:
                ans += 1
print(ans)

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

for i in range(1,N+1,2):
    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())

count8=0

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

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

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

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

ans(105)
res = 0
for i in range(n+1):
    if ans(i):
        res += 1
        
print(res)

Solution (Python):

n = int(input())

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

ans = 0

for i in range(1,n+1):
    if f(i) == 8 and i % 2 == 1:
        ans += 1

print(ans)

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

Solution (Python):
import math
N = int(input())
ans = 0
for i in range(1,N+1,2):
    now = 0
    for j in range(1,math.ceil(math.sqrt(i))+1):
        if i%j == 0:
            now += 2
    if now == 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

ret = 0
for ni in range(1, n+1):
    if ni % 2 == 0 :continue
    divisors = make_divisors(ni)
    if len(divisors) == 8:
        ret += 1

print(ret)

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

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


def divisor(x):
    div = []
    div_append = div.append
    for i in range(1, int(x**.5)+1):
        if x % i == 0:
            div_append(i)
            div_append(x//i)
    div.sort()
    return div

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

Solution (Python):
def make_divisors(n) -> list:
    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())
cnt = 0
for i in range(105, 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):
    if i % 2 == 0:
        continue

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

print(ans)

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