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())
ans = []

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

print(len(ans))

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

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

print(cnt)

Solution (Python):
from math import sqrt


def divisors(n: int) -> list:
    sq = int(sqrt(n))
    l, m, r = [], [], []
    if sq * sq == n:
        m = [sq]
    else:
        sq += 1

    for i in range(1, sq):
        if n % i == 0:
            l.append(i)
            r = [n // i] + r

    return l + m + r


def one_hundred_and_five(N: int) -> int:
    count = 0
    for n in range(105, N + 1, 2):
        if len(divisors(n)) == 8:
            count += 1
    return count


if __name__ == "__main__":
    N = int(input())
    ans = one_hundred_and_five(N)
    print(ans)

Solution (Python):

N=int(input())

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

Solution (Python):


import sys 


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


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

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

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

l = []
for i in range(1, 201):
    if i % 2 == 1:
        if diviser(i) == 8:
            l.append(i)
print(bisect.bisect_right(l, N))

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

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

print(result)

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

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

print(result)

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

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

print(result)

Solution (Python):
N = int(input())
ans = list()
for j in range((N+1)//2):
  A = list()
  for i in range(2*j + 1):
    if (2*j + 1) % (i+1) ==0:
      A.append(i)
  if len(A) == 8:
    ans.append(j)
print(len(ans))

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

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

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

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

print(ans)

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


N = int(input())
c = 0
if N >= 105:
    for i in range(105, N + 1, 2):
        if divisor_count(i) == 8:
            c += 1
print(c)

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())
answer = 0

for x in range(1,N+1,2):
    divlist = []
    for y in range(1,x+1):
        if x % y == 0:
            divlist.append(y)
    if len(divlist) == 8:
        answer += 1

print(answer)

Solution (Python):
def solve(string):
    n = int(string)
    return "0" if n < 105 else "1" if n < 135 else "2" if n < 165 else "3" if n < 189 else "4" if n < 195 else "5"


if __name__ == '__main__':
    print(solve(input()))

Solution (Python):

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


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

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

print(s)

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





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

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

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

def func(n):
    """
    nの約数が８個だったらTrueを返す関数
    """
    yaku = []
    for i in range(1, n+1):
        if n % i == 0:
            yaku.append(i)
    
    return True if len(yaku) == 8 else False

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

print(count)

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

def yakusu(num):
    list_a=[]
    for i in range(1,num//2+1):
        if num % i == 0:
            list_a.append(i)
    list_a.append(num)
    return list_a

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

Solution (Python):
n=int(input())
l=[]
for i in range(3,n+1,2):
    c=0
    for k in range(1,i+1):
        if i%k==0:
            c+=1
        else:
            pass
    l.append(c)
print(l.count(8))

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


if __name__ == "__main__":
    main()

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

Solution (Python):
n=int(input())
L=[105,135,165,189,195]
print(len(list(filter(lambda x:x<=n,L))))

Solution (Python):
from bisect import bisect_right
print(bisect_right([105,135,165,189,195],int(input())))

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

ans=0

for i in range(1,N+1):
  if i%2==1 and dnum(i)==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):
a=0
L=[]
N=int(input())
for i in range(1,N+1):
  if i%2==1: 
    a=0
    for j in range(1,i+1):
      if i%j==0:
        a+=1
    L.append(a)
    
  
print(L.count(8))

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

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

print(res)

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

con=0

for i in range(num):
    con_div=0
    i+=1
    for j in range(num):
        j+=1
        if i%j==0:
            con_div+=1  
    if con_div==8 and i%2!=0:
        con+=1        
print(con)

Solution (Python):


from collections import deque
import itertools as it
import sys
import math

sys.setrecursionlimit(1000000)

INF = 10 ** 18

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

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

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


if __name__ == "__main__":
    main()

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

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

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


print(num)

Solution (Python):
n = int(input())
num = [i for i in range(1,n+1)]
ans = 0
for m in num:
    if m==3*5*7 or m==3*5*11 or m==3*5*13 or m==27*5 or m==27*7:
        ans += 1
print(ans)

Solution (Python):
n=int(input());print(sum(x<n-99for x in[5,35,65,89,95]))

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

for i in range(1,N+1):
	yakusu = 0
	if i % 2 == 1:
		for j in range(1,N+1):
			if i % j == 0:
				yakusu += 1
	if yakusu == 8:
		eight += 1
		
print(eight)

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

Solution (Python):


"""
Created on Mon Feb 11 05:38:56 2019

@author: shinjisu
"""



import math


def getInt(): return int(input())


def getIntList(): return [int(x) for x in input().split()]


def zeros(n): return [0]*n


def dmp(x):
    global debug
    if debug:
        print(x)


debug = True


def getIntLines(n): return [int(input()) for i in range(n)]


def getIntMat(n):
    mat = []
    for i in range(n):
        mat.append(getIntList())
    return mat


def zeros2(n, m): return [zeros(m)]*n


def prob096():  
    X = getIntList()
    K = getInt()
    dmp((X, K))
    total = sum(X) - max(X) + max(X)*2**K
    return total


def prob097():  
    X = getInt()
    dmp(X)
    if X == 1:
        return 1
    for n in range(X, 0, -1):
        dmp(n)
        for b in range(2, int(math.sqrt(X))+1):
            a = n
            exp = True
            while a > 1:
                if a % b != 0:
                    exp = False
                    break
                a //= b
            if exp:
                break
        if exp:
            break
    return n


def prob098():  
    N = getInt()
    S = input()
    dmp((N, S))
    maxChCount = 0
    for i in range(1, N):
        before = S[:i]
        after = S[i:]
        dmp((before, after))
        chCount = 0
        for j in range(26):
            ch = chr(ord('a')+j)
            if ch in before and ch in after:
                chCount += 1
        maxChCount = max(maxChCount, chCount)
    return maxChCount


def prob099():  
    a, b = getIntList()
    height = 0
    for i in range(b-a+1):
        height += i
    height -= b
    return height


def prob103():  
    S = input()
    T = input()
    for i in range(len(S)):
        S = S[1:] + S[0]
        dmp(S)
        if S == T:
            return 'Yes'
    else:
        return 'No'


def prob110():  
    N, M, X, Y = getIntList()
    cX = getIntList()
    cY = getIntList()
    dmp((N, M, X, Y))
    dmp(cX)
    dmp(cY)
    NW = 'No War'
    WA = 'War'
    if Y <= X:
        return WA
    cX.sort()
    cY.sort()
    dmp(cX)
    dmp(cY)
    if cX[-1] < cY[0] and \
            X < cY[0] and \
            cX[-1] < Y:
        return NW
    else:
        return WA


def prob109():  
    N = getInt()
    W = []
    for i in range(N):
        W.append(input())
    dmp(W)
    ALPHABET = [chr(i+ord('a')) for i in range(26)]
    NO = 'No'
    dmp(ALPHABET)
    used = set([W[0]])
    for i in range(1, N):
        dmp(used)
        if W[i] in used:
            return NO
        used.add(W[i])
        if W[i-1][-1] != W[i][0]:
            return NO
    return 'Yes'


def prob106():  
    N = getInt()
    div8Count = 0
    for i in range(1, N+1):
        divCount = 0
        for j in range(1, i+1):
            
            if i % j == 0:
                divCount += 1
        dmp((i,divCount))
        if divCount == 8 and i % 2 ==1:
            div8Count += 1
    return div8Count


def prob100():  
    return 0


debug = False  
print(prob106())

Solution (Python):



def count_div(n):
    return sum([n % i == 0 for i in range(1, n+1)])


N = int(input())
print(sum(count_div(i) == 8 for i in range(1, N + 1, 2)))

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

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

print(len(list(filter(lambda x:x<=N, eight))))

Solution (Python):
N = int(input())
ans = []
if N < 105:
    print(0)
    exit()
cnt = 0
for i in range(2, N+1):
    ans = []
    for j in range(1, i+1):
        if i % j == 0:
            ans.append(i)
        if len(ans) == 8 and i % 2 != 0:
            cnt += 1
            break
print(cnt)

Solution (Python):
n=int(input())
if n < 105:
  print(0)
elif n == 105:
  print(1)
else:
  k = range(106, n+1)
  l = [i for i in k if i%2 != 0]
  ans = [105]
  for m in l:
    l = [i for i in range(1,m//2+1) if m%i == 0]
    if len(l) == 7:
      ans.append(m)

  print(len(ans))

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

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

Solution (Python):
def main() -> None:
    N = int(input())
    l = [v for v in range(1, N + 1) if v % 2 == 1]

    c = t = 0

    for n in l:
        for i in range(1, n + 1):
            if n % i == 0:
                t = t + 1
        c = (c + 1) if t == 8 else c
        t = 0
    print(c)


if __name__ == '__main__':
    main()

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

counter = 0
for n in range(1, int_n + 1):

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

print(counter)

Solution (Python):
N = int(input())
count = 0
for n in range(1, N + 1, 2):
    divisor = [i for i in range(2, n // 2 + 1) if n % i == 0]
    if len(divisor) == 6:
        count += 1
print(count)

Solution (Python):
import itertools

n=int(input())

count=0

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

X=list(itertools.combinations(X,3))



for i in range(10):
    if X[i][0]*X[i][1]*X[i][2]<=n:
        count+=1

if n<135:
    count+=0
elif n<189:
    count+=1
else:
    count+=2
        
print(count)

Solution (Python):
def div(num):
    counter = 0
    for i in range(num):
        if num % (i+1) == 0:
            counter += 1
    return counter
N = int(input())
sumcount = 0
for i in range(N):
    if div(i+1)==8:
        if (i+1) % 2 != 0:
            sumcount += 1
print(sumcount)

Solution (Python):
def divisors(n):
	divs = {1:0,n:0}
	i = 2
	while i*i<=n:
		if n%i==0:
			divs[i] = 0
			divs[n/i] = 0
		i += 1
	return divs

N = raw_input()
N = int(N)

print(len([i for i in range(3,N+1,2) if len(divisors(i))==8]))

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

Solution (Python):
import sys

def divisor(n):
  c = 1
  for i in range(2, n+1):
    m = 1
    while n % i == 0:
      n //= i
      m += 1
    c *= m
  return c

def main():
  input = sys.stdin.readline
  N = int(input())
  ans = 0
  for i in range(1, N+1, 2):
    if divisor(i) == 8:
      ans += 1
    
  print(ans)


if __name__ == '__main__':
  main()

Solution (Python):
import numpy as np

def countf(a):
    count = 0

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

n = input()
n = int(n)

count = 0

ls = []

for i in range(1, n + 1, 2):
    if(countf(i) == 8):
        count += 1
        ls += [i]

'''   
print(ls)

print("ここまで")
'''

print(count)

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

Solution (Python):
import math


def divisor(div, N):
    
    i = 1
    n = N

    while i <= math.sqrt(n):
        if n % i == 0:
            div.append([i, n // i])
        i += 1


N = int(input())

cnt = 0

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

    div = []
    divisor(div, i)

    if len(div) == 4:
        cnt += 1

print(cnt)

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

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

Solution (Python):

n = int(input())
ans = 0
for i in range(1, n+1)[0::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())
if n >= 195:
    print(5)
elif n >= 189:
    print(4)
elif n >= 165:
    print(3)
elif n >= 135:
    print(2)
elif n >= 105:
    print(1)
else:
    print(0)

Solution (Python):
n = int(input())
c = []
for i in range(1,n+1):
    k = []
    for j in range(1,i+1):
        if i % j == 0:
            k.append(j)

    if len(k) == 8:
        if i % 2 != 0:
            c.append(i)
print(len(c))

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

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

Solution (Python):
n = int(input())
odd = [i for i in range(1, n+1, 2)]
[[a * b for a in range(1, 4)] for b in range(1, 4)]
yakusu_list = [[i for i in odd if j%i == 0] for j in odd]
c = len([i for i in yakusu_list if len(i) == 8])
print(c)

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

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

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

print(sum)

Solution (Python):
N = int(input())
if N < 105:
    print(0)
    exit()
elif N == 105:
    print(1)
    exit()
else:
    dP ={2,3,5,7}
    for i in range(10,int(200**0.5)+2):
        bF = True
        for j in dP:
            if 0 == i % j :
                bF = False
                break
        if bF:
            dP.add(i)
    aP = sorted(list(dP - {2}))
    iL = len(aP)
    aN = []
    for i in range(iL):
        i1 = aP[i]
        i3 = i1**3
        for j in range(i+1,iL):
            j1 = aP[j]
            aN.append(i3*j1)
            for k in range(j+1,iL):
                k1 = aP[k]
                aN.append(i1*j1*k1)
                aN.append(i3*k1)

    aN = sorted(list(set(aN)))
    for i in range(len(aN)):
        if N < aN[i]:
            print(i)
            exit()

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())
i = 1
counter = 0

while i <= n:
    answer = 0
    k = 1
    while k**2  < i:
        if i % k == 0:
            if i == k**2:
                answer+=1
            else:
                answer += 2
        k+=1
    i += 2
    if answer == 8:
        counter+=1

print(counter)

Solution (Python):
from collections import Counter
class Solver(object):
    def __init__(self):
        self.n = int(input())
        self.primes = Solver.generate_primes(self.n)

    def solve(self):
        count = 0
        for i in range(2, self.n+1):
            if i % 2 != 0:
                factors = self.prime_factorize(i)
                if len(set(factors)) == len(factors):
                    if self.has_eight(factors):
                        
                        count += 1
                else:
                    c = Counter(factors)
                    s = list(c.keys())
                    if len(s) == 2:
                        if (c[s[0]] == 1) and (c[s[1]] == 3) or ((c[s[0]] == 3) and (c[s[1]] == 1)):
                            
                            count += 1

        print(count)
    
    def has_eight(self, factors):
        return len(set(factors)) == 3

    def prime_factorize(self, n):
        factor = []
        for i in self.primes:
            if i > n:
                break
            if n % i == 0:
                factor.append(i)
                n = int(n/i)
                while n % i == 0:
                    factor.append(i)
                    n = int(n/i)
        return factor

    @staticmethod
    def generate_primes(length):
        """Generate prime from 1 to length, inclusive"""
        primes = []
        if length < 2:
            return primes
        numbers = range(2, length+1)  
        i = numbers[0]
        while True:
            primes.append(i)
            new_numbers = []
            for j in numbers:
                if j % i != 0:
                    new_numbers.append(j)
            numbers = new_numbers
            if len(numbers) == 0:
                break
            i = numbers[0]
        return primes


if __name__ == "__main__":
    s = Solver()
    s.solve()

Solution (Python):
n = int(input())
if 1 <= 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")
elif 195 <= n <= 200:
    print("5")

Solution (Python):
import math

n = int(input())
count = 0
for i in range(1, n+1, 2):
    lst = [0] * 20
    for j in range(2, int(math.sqrt(i))+1):
        if i % j == 0:
            lst[j] += 1
    a = 1
    for k in lst:
        a *= (k+1)
    if a == 8:
        count += 1

print(count)

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

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())
cnt = 0
for i in range(1,n+1):
    if i%2 == 1:
        if len([x for x in range(1,n+1) if i % x == 0]) == 8:
            cnt += 1
print(cnt)

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

odd = [i for i in range(1,201,2)]
odd_y = [1 for i in range(1,201,2)]

for i in range(len(odd)):
    for k in range(1,i+1):
        if odd[i] % k == 0:
            odd_y[i] += 1
        else:
            pass

all = []

for i in range(len(odd_y)):
    if odd_y[i] == 8:
        all.append(odd[i])


count = 0
for i in all:
    if n >= i:
        count += 1

print(count)

Solution (Python):
n=int(input())
ansList=[105, 135, 165, 189, 195]
m=len(list(filter(lambda x:x<=n,ansList)))
print(m)

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

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

print(anscount)

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

Solution (Python):
N = int(input())
print(len([numlist for numlist in [[num for num in range(1,kisu+1) if kisu%num == 0] for kisu in [i for i in range(N+1) if i%2!=0]] if len(numlist)==8]))

Solution (Python):



import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

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

Solution (Python):
def judge(jnum):
    res = 0
    if (jnum & 1) == 0:
        return False
    for k in range(1,jnum+1):
        if jnum % k == 0:
            res += 1
    if res == 8:
        return True
    else:
        return False

N = int(input())
num = 0
for i in range(1,N+1):
    if judge(i):
        num += 1
print(num)

Solution (Python):
def judge(N):
    cnt = 0
    if (N & 1) == 0:
        return False
    for i in range(1, N+1):
        if N % i == 0:
            cnt += 1
    if cnt == 8:
        return True
    else:
        return False

N = int(input())
cnt = 0
for i in range(1, N+1):
    if judge(i):
        cnt += 1

print(cnt)

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

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

Solution (Python):
N = int(input())
count_number=0
for i in range((N-105)//2+1):
  count_yakusu=0
  for j in range((2*i+105)//2+1):
    if((2*i+105) % (2*j+1)==0):
      count_yakusu+=1
    else:continue
  if(count_yakusu==8):
    count_number+=1
  else:continue
print(count_number)

Solution (Python):
""" AtCoder """

N = int(input())

ans = 0

for i in range(1, N+1):
    if i%2 == 1:
        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 dividors(n):
    res = []
    for i in range(1, n + 1):
        if n % i == 0:
            res.append(i)
    return res

def main():
    n = int(input())
    res = 0
    for i in range(1, n + 1):
        if i % 2 == 1 and len(dividors(i)) == 8:
            res += 1
    print(res)

main()

Solution (Python):

import sys

N = int(input())

ans = 0
for j in range(1, N+1):
    if j % 2 == 0:
        continue
    s = int(j / 3)
    count = 0
    for i in range(1, s+1):
        if j % i == 0:
            count += 1
    if count == 7:
        ans += 1
print(ans)

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

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

ans=0
for i in range(1,N+1,2):
  tmp=0
  t=i**(1/2)
  for j in range(1,int(t)+1):
    if i%j==0:
      tmp+=1
      
  tmp=tmp*2
  if t-int(t)<=1e-3:
    tmp-=1

  if tmp==8:
    ans+=1
      
print(ans)

Solution (Python):
def main():
    N = int(input())
    ans = 0
    for n in range(1, N + 1, 2):
        c = 0
        for i in range(1, N + 1):
            if c > 8:
                break
            if n % i != 0:
                continue
            c += 1
        if c == 8:
            ans += 1
    print(ans)


main()

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

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

Solution (Python):
def f(n):
    t = 1
    count = 0
    while(n>=t**2):
        if n%t == 0:
            count += 2 if t != n//t else 1
        t += 1
    return count

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

Solution (Python):

import bisect

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

    a = [3 ** 3 * 5, 3 ** 3 * 7, 3 * 5 * 7, 3 * 5 * 11, 3 * 5 * 13]
    a.sort()

    print(bisect.bisect_right(a, N))


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

for n in range(N//2+1):
    x=2*n+1
    if x>N:
         break

    num = 0
    for i in range(1,x+1):
        if x%i == 0:
            num +=1
        if num>8:
            break
    if num == 8:
        ans+=1

print(ans)

Solution (Python):
def check(n):
    """
    nの約数が8個かどうかを調べる
    """
    count = 0
    for i in range(1, n + 1):
        if n % i == 0:
            count += 1

    if count == 8:
        
        return True
    else:
        return False


def main():
    n = int(input())
    count = 0
    for i in range(3, n + 1, 2):
        if check(i):
            count += 1

    print(count)


if __name__ == '__main__':
    main()

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