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

print(count)

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

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

Solution (Python):
def solve():
    n = int(input())
    ans = 0
    for i in range(1, n + 1, 2):
        divider = 0
        for j in range(3, n // 3 + 1, 2):
            if i % j == 0:
                divider += 1
        if divider == 6:
            ans += 1
    print(ans)


if __name__ == "__main__":
    solve()

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

if n < 105:
	print(0)
elif n == 105 or n == 106:
	print(1)
else:
	if n % 2 == 0:
		length = int(n / 2) - 1
	else:
		length = int(n / 2)
	array = []
	answer = 1
	for i in range(53,length+1):
		number = i * 2 + 1
		for x in range(1,n+1):
			if number % x == 0:
				array.append(x)
		if len(array) == 8:
			answer += 1
		array.clear()
	print(answer)

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

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

Solution (Python):
def main():
    N =  int(input())
    cnt = 0
    for i in range(3, N + 1, 2):
        div = 0
        for j in range(1,i+1):
            if i % j == 0:
                div += 1
        if div == 8:
            cnt += 1

    print(cnt)


main()

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):
import sys
from collections import deque

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    N = int(inputs[0])
    count = 0
    for i in range(1, N + 1):
        divisor_num = 0
        if i % 2 == 0:
            continue
        for j in range(1, i + 1):
            if i % j == 0:
                divisor_num += 1
        if divisor_num == 8:
            count += 1
    return count


def string_to_int(string):
    return list(map(int, string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)

Solution (Python):
n = int(input())
ans = 0
for i in range(n+1):
    if i%2 == 1:
        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())
import bisect
idx=bisect.bisect([105, 135, 165, 189, 195],n)
print(idx)

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

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):
import math
import copy
import sys

inputa = input().split()



a = int(inputa[0])























anscnt = 0
for i in range(1, a+1, 2):
    cnt = 0

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

    if cnt == 8:
        anscnt += 1

print(int(anscnt))

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

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

    
    return len(divisors)

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

Solution (Python):
N = int(input())
c = 0
for i in range(1, N + 1):
    list = []
    if i % 2 == 1:
        for j in range(1, int(i ** 0.5) // 1 + 1):
            if i % j == 0:
                list.append(j)
                if not j == i // j:
                    list.append(i // j)
        if len(list) == 8:
            c += 1
print(c)

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

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

print(counter)

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

count = 0

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

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

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_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

print(sum(1 for j in range(1, n + 1) if len(make_divisors(j)) == 8 and j % 2 == 1))

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

Solution (Python):


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

    
    return divisors

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

Solution (Python):
n = int(input())
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())
count = 0
for i in range(1, n+1):
    if i%3 ==0 and i%5 == 0 and i%7 ==0:
        count+=1
    
    elif i%27==0 and i%5==0:
        count+=1
    
    elif i%27==0 and i%7 ==0:
        count+=1
    elif i%3==0 and i%5==0 and i%13==0:
        count+=1
    elif i%3 ==0 and i%5==0 and i%11 ==0:
        count+=1

print(count)

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

Solution (Python):
N=int(input())
odds = [i*2+1 for i in range(100)]
cnt=0
for odd in odds:
  
  if odd>N:
    break
  temp_cnt=0
  for lil_odd in odds:
    
    if lil_odd>odd:
      if temp_cnt==8:
        cnt+=1
      break
    if odd%lil_odd==0:
      
      temp_cnt+=1
  
print(cnt)

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

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

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

print(ans)

Solution (Python):
N = int(input())
def count_yakusu(n):
    yakusu = []
    for i in range(1,n+1):
        if n%i == 0:
            yakusu.append(i)
    return len(yakusu)

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

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

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

Solution (Python):
n = int(input())
count = 0
def divCount(n):
    cnt = 0
    for i in range(1, n+1):
        if n % i == 0:
            cnt += 1
    return cnt
for i in range(1,n + 1):
    if i%2 != 0:
        if divCount(i) == 8:
            count += 1
print(count)

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

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

def main():
	n = int(input().strip())
	ans = 0
	for i in range(1, n+1):
		if i % 2 == 1 and div_count(i) == 8:
			ans += 1
	print(ans)

if __name__ == '__main__':
	main()

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

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

k = 0
for i in range(N+1):
    if i % 2 == 1:
        if len(primes(i)) == 8:
            k += 1
print(k)

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

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

for i in range(1, n+1, 2):
    count = 1
    for j in range(1, int(n/2)):
        if i % j == 0:
            count += 1
    if count == 8:
        count_2 += 1

print(count_2)

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

Solution (Python):
def divisor(target):
    divNum = 0

    for i in range(1,target+1):
        if target%i == 0:
            divNum +=1
    
    return divNum

def main():

    N = int(input())
    ans = 0

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








    
if __name__== "__main__":
    main()

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

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

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

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

def FindAllDivisors(x):
    divList = []
    y = 1
    while y <= math.sqrt(x):
        if x % y == 0:
            divList.append(y)
            divList.append(int(x / y))
        y += 1
    return divList
ans = 0
if (N == 105):
  ans = 1
elif (N > 105):
  ans += 1
  for i in range(106, N+1):
    if (i % 2 != 0):
      lst = FindAllDivisors(i)
      if (len(lst) == 8):
        ans += 1
print(ans)

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

Solution (Python):
import numpy as np

a = np.zeros(201)

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

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

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

Solution (Python):
ans = [105,135,165,189]
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())
b=[]
a=[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199]
def f(x):
	b=[]
	y=x
	for i in range(len(a)):
		x=y
		cnt=0
		while cnt>=0:
			if x%a[i]==0:
				cnt+=1
				x=x//a[i]
			else:
				break
		b.append(cnt)
	ans=1
	for i in range(len(b)):
		ans*=b[i]+1
	return ans
ans=0
for j in range(1,n+1,2):
	if f(j)==8:
		ans+=1
print(ans)

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

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

    return divisors

cnt = 0
for i in [i for i in range(1,n+1) if i%2 != 0]:
    if len(make_divisors(i)) == 8:
        cnt += 1

print(cnt)

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

    divisors.sort()
    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());print((n>104)+(n>134)+(n>164)+(n>188)+(n>194))

Solution (Python):
from math import floor, sqrt
 
N = int(input())
ans = 0
for o in range(1, N + 1, 2):
    cnt = 0
    for n in range(1, 1 + floor(sqrt(o))):
    	if o % n == 0:
            cnt += 2
    if cnt == 8:
        ans += 1
print(ans)

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

Solution (Python):
n = list(range(1,int(input())+1,2))
li = []
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
for i in range(len(n)):
    if len(make_divisors(n[i])) == 8:
        li.append(n[i])
print(len(li))

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
    else:
        if cnt == 8:
            ans += 1

print(ans)

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

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

Solution (Python):
from functools import reduce
import math

def main():
    
    
    
    

    
    
    
    
    
    

    
    

    
    
    
    
    
    
    
    
    
    INF = float("inf")

    
    MOD = 10**9+7
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    
    
    
    
    N = int(input())
    ans = 0
    for i in range(1,N+1,2):
        num_of_y = 0
        for j in range(1,N+1):
            if i % j == 0:
                num_of_y += 1
        if num_of_y == 8:
            ans += 1
    print(ans)
    
if __name__ == '__main__':
    main()

Solution (Python):

n = int(input())

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

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

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

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

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

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

c = 0
n = int(input())

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

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


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

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

print(divcnt)

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 divisors(n, sort=False):
    """
    nの約数をO(√n)で列挙する
    """
    d = []
    for i in range(1, int(n ** 0.5) + 1):
        if n % i == 0:
            d.append(i)
            if i != n // i:
                d.append(n//i)
    if sort:
        d.sort()
    return d


N = int(input())

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

print(cnt)

Solution (Python):
def divisors(n, sort=False):
    """
    nの約数をO(√n)で列挙する
    """
    d = []
    for i in range(1, int(n ** 0.5) + 1):
        if n % i == 0:
            d.append(i)
            if i != n // i:
                d.append(n//i)
    if sort:
        d.sort()
    return d


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)

Solution (Python):
import collections
n=int(input())
cnt=0
tmp=[]
for i in range(1,n+1,2):
  for j in range(1,n+1):
    if i%j==0:
      tmp.append(i)
      
x=collections.Counter(tmp)
for j in x.values():
  if j==8:
    cnt+=1
print(cnt)

Solution (Python):
def find(n):
    yakusu=[]
    for i in range(1,n+1):
        if n%i==0:
            if (n/i) in yakusu:
                break
            else:
                yakusu.append(i)
                yakusu.append(n/i)
    return len(yakusu)

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

Solution (Python):


n = int(input())

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

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

print(res)

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

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

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

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

        if count == 8:
            ans += 1

print(ans)

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

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

print(cnt)

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

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

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

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

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

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

ans = 0
for i in range(105, n + 1, 2):
    c = 0
    for j in range(3, n // 2):
        if i % j == 0:
            c += 1
    if c == 6:
        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):
def divisors(n):
    div = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            div.append(i)
            if i**2 != n:
                div.append(n//i)
    return div

n = int(input())

ans = 0

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

Solution (Python):
n = int(input())
if n < 3*5*7:
    print("0")
elif n < 3*5*9:
    print("1")
elif n < 3*5*11:
    print("2")
elif n < 3*7*9:
    print("3")
elif n < 3*5*13:
    print("4")
else:
    print("5")

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



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

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

Solution (Python):
import math
from itertools import groupby 

n = int(input())

def primeFacterList(L):
    """
    L = [num]を素因数分解し、出現した素因数を(小さい順に)リストにして返す
    [2] -> [2]
    [12] -> [2, 6] -> [2, 2, 3]
    [30] -> [2, 15] -> [2, 3, 5]
    """
    num = L.pop()
    limit = int(math.sqrt(num))
    for i in range(2, limit + 1):
        if num % i == 0:
            L.append(i)
            L.append(num // i)
            return primeFacterList(L)
    else:
        L.append(num)
        return L


def calc_divisor(L):
    """
    L = [prime facter list]なる自然数の約数の個数を返す
    """
    divisor = 1
    for key, val in groupby(L):
        divisor *= (len(list(val)) + 1)
    return divisor


count = 0
for i in range(1, n+1):
    if i % 2 == 1 and calc_divisor(primeFacterList([i])) == 8:
        count += 1

print(count)

Solution (Python):
N = int(input())
ansCnt = 0
for i in range(1, N + 1, 2):
    tmpCnt = 0
    for j in range(1, N + 1):
        if i < j:
            break
        if i % j == 0:
            tmpCnt += 1
    if tmpCnt == 8:
        ansCnt += 1

print(ansCnt)

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

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

S = [3*5*7, 3*5*11, 3*5*13, 3**3*5, 3**3*7]

ans = 0
for s in S:
    if s <= N:
        ans += 1
print(ans)

Solution (Python):
a = int(input())
n = list(range(1,a+1))
n = n[0::2]

ans = 0
arr = []
x = 1
count = 0
for i in n:
  count = 0
  for x in range(1,a+1):
    if  i % x ==0:
      count +=1
      
  arr.append(count)    
    
    
print(arr.count(8))

Solution (Python):
import sys

n = int(input())
coun = 0
def yaku(num):
    yakusuu_array = []
    for i in range(1,num+1):
        if num % i == 0:
            yakusuu_array.append(i)
    return len(yakusuu_array)

for i in range(1,n+1,2):
    p = yaku(i)
    if p == 8:
        coun += 1
print(coun)

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

res = 0
for i in range(1,n+1):
    if i%2 == 1:
        x = make_divisors(i)
        if len(x) == 8:
            res += 1
print(res)

Solution (Python):
N = int(input())
 
def divisor_num(n):
    ans = 0
    for i in range(1, n + 1):
        if n % i == 0:
            ans += 1
    return ans
 
ans = 0
for i in range(1, N + 1):
    if i % 2 != 0 and divisor_num(i) == 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):
    if i % 2 != 0:
        if len(make_divisors(i)) == 8:
            ans += 1
print(ans)

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


def A():
    a, b = LI()
    print((a-1)*(b-1))
    return


def B():
    def est(n):
        res = 0
        for i in range(1, int(n ** 0.5) + 1):
            if not n % i:
                res += 2
        res -= float.is_integer(n ** 0.5)
        return res == 8
    n = II()
    ans = 0
    for i in range(1, n + 1, 2):
        ans += est(i)
    print(ans)
    return


def C():
    return


def D():
    return


if __name__ == '__main__':
    B()

Solution (Python):
def yakusu(x):
    ans=0
    for i in range(x+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)

yakusu(int(input()))

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)

Solution (Python):
import sys

def input():
    return sys.stdin.readline().rstrip()

if __name__ == "__main__":
    n = int(input())

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

        if dcount == 8:
            count += 1

    print(count)

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

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

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

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

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

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

res=0

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

print(res)

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

ans = int(n >= 105)
for i in range(107, n + 1, 2):
    dc = 0
    for j in range(1, i // 2):
        if i % j == 0:
            dc += 1
    if dc == 7:
        ans += 1
print(ans)

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

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

    for i in range(1,x+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
    return(ans)

s=int(input())
print(yakusu(s))

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):
def divisor_num(x):
    num = 0
    for i in range(1,int(x**0.5)+1):
        num += (x%i == 0)*2
    num -= (x**0.5).is_integer()
    return num

n=int(input())
c = 0
for i in range(1,n+1,2):
    c += (divisor_num(i) == 8)
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)