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())
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)
else:
    print(5)

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

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

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

print(num)

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

Solution (Python):
import math


def get_divisors(n):
    """
    n の約数をリストで返す
    :param int n:
    :rtype: list of int
    """
    ret = []
    for i in range(1, int(math.sqrt(n)) + 1):
        if n % i == 0:
            ret.append(i)
            if n // i != i:
                ret.append(n // i)
    return ret


N = int(input())
print(len([i for i in range(1, N + 1) if i % 2 == 1 and len(get_divisors(i)) == 8]))

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

c = 0
for i in range(N):
  n = i + 1
  if n % 2 == 0:
    continue
  if len(make_divisors(n)) == 8:
    c += 1

print(c)

Solution (Python):
n = int(input())
def cntdiv(x):
  cnt = 0
  for i in range(1,x+1,1):
    if (x % i == 0) and (x % 2 == 1): cnt += 1
  return cnt
def cntans(x):
  if x <= 1:
    return 0
  if cntdiv(x) == 8:
    return 1 + cntans(x-1)
  else:
    return cntans(x-1)
print(cntans(n))

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())
count_ans = 0
for i in range(n//2 + 1 if n%2 ==1 else n//2):
  count_y = 0
  for j in range(2*i+2):
    if j > 0:
      if (2 * i + 1)%j == 0:
        count_y += 1
  if count_y == 8:
    count_ans += 1
print(count_ans)

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

Solution (Python):


N = int(input())
count = 0

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

    for j in range(1, i + 1):
        if i % j == 0:
            a.append(j)

    if len(a) == 8:
        count += 1

print(count)

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

c = 0
for i in range(1, n+1, 2):
  if sum([i % j == 0 for j in range(1, i+1)]) == 8:
    c += 1
print(c)

Solution (Python):

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

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

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


print(cnt)

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

Solution (Python):
def main():
	N = int(input())
	dp = [1]*(N+1)
	ans = 0
	for i in range(2, N+1):
		div = 1
		while i * div <= N:
			dp[i*div] += 1
			div += 1
		if dp[i] == 8 and i%2==1:
			ans += 1
	print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
def main():
	N = int(input())
	dp = [1]*(N+1)
	ans = 0
	for i in range(2, N+1):
		div = 1
		while i * div <= N:
			dp[i*div] += 1
			div += 1
		if dp[i] == 8 and i%2==1:
			ans += 1
	print(ans)

if __name__ == '__main__':
    main()

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

Solution (Python):
num = int(input())
count = 1
div_8_list = []
while count < num + 1:
    if count % 2 != 0:
        div = []
        for i in range(1, int(count**0.5)+1):
            if count % i == 0:
                div.append(i)
                if i != count // i:
                    div.append(count//i)
        if len(div) == 8:
            div_8_list.append(div)
    count += 1
print(len(div_8_list))

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

if N%2 == 0:
    M = N+1
else:
    M = N+2


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

print(ans)

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

Solution (Python):
N = int(input())
odds = [i for i in range(1, N + 1) if i % 2 != 0]
ans = 0
for odd in odds:
    cnt = 0
    for bunbo in odds:
        if odd % bunbo == 0:
            cnt += 1
    if cnt == 8:
        ans += 1

print(ans)

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

if N < 105:
    print(0)
else:
    ans = 1
    for i in range(107, N+1, 1):
        count = 0
        if i % 2 ==0:
            continue
        for j in range(3, i, 2):
            if i % j == 0:
                count += 1
            if count > 6:
                break
        if count == 6:
            ans += 1
    print(ans)

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

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

Solution (Python):


N = int(input())
count = 0

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

    for j in range(1, i + 1):
        if i % j == 0:
            a.append(j)

    if len(a) == 8:
        count += 1

print(count)

Solution (Python):
def calculate_num_of_divisor(N):
    yakusuu = []
    for i in range(1, N+1):
        if N % i == 0:
            yakusuu.append(i)
    return len(yakusuu)

N = int(input())
count = []
for i in range(N+1):
    if i % 2 == 1 and calculate_num_of_divisor(i) == 8:
        count.append(i)
print(len(count))

Solution (Python):


N = int(input())
count = 0

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

    for j in range(1, i + 1):
        if i % j == 0:
            a.append(j)

    if len(a) == 8:
        count += 1

print(count)

Solution (Python):


N = int(input())
count = 0

for i in range(1, N + 1):
    a = []
    all_odd = 0
    for j in range(1, i + 1):
        if i % j == 0:
            a.append(j)
    for k in a:
        if k % 2 == 0:
            all_odd += 1
    if all_odd == 0 and len(a) == 8:
        count += 1

print(count)

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

count = [0] * 201
count[105] = 1
for i in range(105, 201):
    if i % 2 == 1:
        num = 0
        for n in range(1, i+1):
            if i % n == 0:
                num += 1
        if num == 8:
            count[i] = count[i-1]+1
        else:
            count[i] = count[i-1]
    else:
        count[i] = count[i-1]

print(count[N])

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 != 0:
    ans += 1

print(ans)

Solution (Python):
n = int(input())
def get_factors(n):
    f = set()
    for i in range(1,int((n**0.5))+1):
        if n % i == 0:
            f.add(i)
            f.add(n//i)
    return len(f)
ans = 0
for i in range(1,n+1):
    if get_factors(i) == 8 and i % 2 == 1:
        ans += 1
print(ans)

Solution (Python):
from collections import Counter
from functools import reduce
import fractions
import math
import statistics
import sys
import time
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return [int(x) for x in sys.stdin.readline().split()]  
def LF(): return [float(x) for x in sys.stdin.readline().split()]  
def LS(): return sys.stdin.readline().split()  
def MI(): return map(int, sys.stdin.readline().split())  
def II(): return int(sys.stdin.readline())  
def IS(): return input()  
def P(x): return print(x)
def C(x): return Counter(x)
def GCD_LIST(numbers):  
    return reduce(fractions.gcd, numbers)
def LCM_LIST(numbers):  
    return reduce(LCM, numbers)
def LCM(m, n):
    return (m * n // fractions.gcd(m, n))


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

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

anscnt = 0
for n in range(1, N+1, 2):
  cnt = 0
  for k in range(1, n+1):
    if n % k == 0:
      cnt += 1
  if cnt == 8:
    anscnt += 1
    
print(anscnt)

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

yakusuu8ko = [3*5*7, 3*5*11, 3*5*13, 3**3*5, 3**3*7]
print(len([n for n in yakusuu8ko if n<=N]))

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

Solution (Python):
import math
n = int(raw_input())
count = 0
for i in range(101,n+1,2):
	cuenta = 0
	for j in range(1,int(math.floor(i**0.5)+1),2):
		if i == j ** 2:
			cuenta += 1
		elif i % j == 0:
			cuenta += 2

	if cuenta == 8:
		count += 1

print count

Solution (Python):

import sys
import itertools
import collections
import functools
import math
from queue import Queue

INF = float("inf")


def trial_division_sqrt(n):
    prime_count = collections.Counter()

    for i in range(2, int(math.sqrt(n)) + 2):
        while n % i == 0:
            n /= i
            prime_count[i] += 1
    if n > 1:
        prime_count[int(n)] += 1

    return prime_count


def num_divisors(prime_count):
    num = 1

    for prime, count in prime_count.items():
        num *= (count + 1)

    return num


def solve(N: int):

    count = 0
    for i in range(1, N+1, 2):
        prime_count = trial_division_sqrt(i)
        if num_divisors(prime_count) == 8:
            count += 1
    print(count)
    return


def main():

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


if __name__ == '__main__':
    main()

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

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

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

print(sum.count(8))

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

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

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

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

Solution (Python):
def get_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())
    result = 0
    for n in range(1, N+1, 2):
        div = get_divisors(n)
        if len(div) == 8:
            result += 1

    print(result)


main()

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())
ans = 0
for n in range(1, N + 1, 2):
    j = 1
    tmp = []
    while j < n / 2:
        if n / j == n // j:
            tmp.append(j)
            tmp.append(n // j)
        j += 1
    if len(set(tmp)) == 8:
        ans += 1
print(ans)

Solution (Python):
N = int(input())
li = [0]*(N+1)
for i in range(1,N+1):
    a = 1
    while(a*i <= N):
        
        li[a*i] += 1
        a += 1
cnt = 0
for index,i in enumerate(li):
    if(i == 8 and index%2==1):
        cnt+=1
print(cnt)

Solution (Python):
n = int(input())
kisu_list = [i for i in range(1,n+1) if i%2==1]
count = 0
for kisu in kisu_list:
    yakusu = [i for i in range(1,kisu+1) if kisu%i==0]
    if len(yakusu)==8:
        count += 1
print(count)

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

def get_soinsu(n,d = None):
    if d == None:
        d = {}
    if n == 1 :
        return d
    for i in (3,5,7,11,13):
        if n%i == 0:
            d[i] = d.get(i,0) + 1
            break
    else:
        return {n:1}
    return get_soinsu(n//i,d)

out = 0
for i in range(105,N+1,2):
    tmp = get_soinsu(i)
    p = 1
    for j in tmp.values():
        p *= (j+1)
    if p == 8:
        out += 1
print(out)

Solution (Python):
import bisect;print(bisect.bisect([6,36,66,90,96],int(input())-99))

Solution (Python):
N = int(input())
res = 0
for i in range(1,N+1):
    if(i% 2 == 0):
        continue
    tmp = i
    g = 1
    for j in range(2,i+1):
        fac = 0
        while tmp%j == 0:
            tmp = tmp//j
            fac = fac + 1
        g = g*(fac+1)
    if(g == 8):
        res = res + 1
print(res)

Solution (Python):
n = int(input())
def div(k):
    divider = []
    for i in range(1,int(k**0.5) + 1):
        if k % i == 0:
            divider.append(i)
            if k//i != i:
                divider.append(k//i)
    return len(divider)
sum = 0
for i in range(int(n/2 + 1/2)):
    if div(2*i + 1) == 8:
        sum += 1
print(sum)

Solution (Python):
n = int(input())
ans = 1
k = 107
i = 1
count = 0
if n < 105:
    print(0)
else:
    while k <= n:
        while i <= k:
            if k % i == 0 :
                count += 1
            if count == 8:
                ans += 1
                break   
            i += 2
        count = 0
        i = 1
        k += 2
    print(ans)

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

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

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

print(ans)

Solution (Python):
from sys import stdin
N=int(stdin.readline().rstrip())
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 != 0:
        ans+=1
print(ans)

Solution (Python):


n = int(input())

def yakusuu(num):
    yakusuu_array = []
    for i in range(1,num):
        if num % i == 0:
            yakusuu_array.append(i)
    return(len(yakusuu_array)+1)

ans = 0

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

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

def aaa(N):
    ans = 0
    if N < 105:
        print(ans)
        return

    odd_list = [i for i in range(1, N+1) if i % 2 ==  1]
    odd_list2 = [i for i in range(105, N+1) if i % 2 ==  1]

    for j in odd_list2:
        c = 0
        for i in odd_list:
            if j % i == 0:
                c += 1
                if c == 8:
                    ans += 1
                    break
    print(ans)
aaa(N)

Solution (Python):

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

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

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

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

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

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

print(ans)

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

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

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


def divisors(N):
  sum = 0
  for i in range(1,int(N**0.5+1)):
    if N % i == 0:
      if i **2 == N:
        sum += 1
      else:
        sum +=2
  return sum

SUM = 0 

for x in range(1,N+1,2):
  div = divisors(x)
  if div == 8:
    SUM += 1
print(SUM)

Solution (Python):
def yakusu(n):
  a=[]
  for i in range(1,n+1):
    if n%i==0:a.append(i)
  return a
a=0;n=int(input())
for i in range(1,n+1):a+=(1if len(yakusu(i))==8and i%2==1else 0)
print(a)

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

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

list_yakusuu = []

cnt = 0
for i in range(1,N+1):
  list_yakusuu = []
  if i % 2 == 0:
    continue
    
  for j in range(1,i+1):
    if i % j == 0:
      list_yakusuu.append(j)
  
  if len(list_yakusuu) == 8:
    cnt += 1

print(cnt)

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

Solution (Python):
ri = lambda: int(input())
rl = lambda: list(map(int,input().split()))
rr = lambda N: [ri() for _ in range(N)]
YN = lambda b: print('YES') if b else print('NO')
yn = lambda b: print('Yes') if b else print('No')
OE = lambda x: print('Odd') if x%2 else print('Even')
INF = 10**18

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

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

divisor_num = [0] * 201

def get_divisor_num(a):
  count = 0
  for i in range(1,(a+1)//2):
    if a%i == 0:
      count+=1
  return count+1
    
for i in range(1,200):
  divisor_num[i] = get_divisor_num(i)
  
ans = 0
for i in range(n+1):
  if divisor_num[i] == 8 and i % 2 == 1:
    ans += 1
    
print(ans)

Solution (Python):
n = int(input())
count = 0
divisor_count = 0
for num in range(1, n+1):
    if num % 2 != 0:
        divisor_list = []
        for divisor in range(1, num+1):
            if num % divisor == 0:
                divisor_list.append(divisor)
        if len(divisor_list) == 8:
            count += 1
print(count)

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):
from sys import stdin
n = int(stdin.readline().rstrip())
l = [i for i in range(1,n+1)][0::2]
ans=0
for i in l:
    count=0
    for j in l:
        if i%j==0:
            count+=1
    if count==8:
        ans+=1
print(ans)

Solution (Python):

N=input()
N=int(N)

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

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

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

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

n=0
m=0
for i in range(N):

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

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

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

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

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

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

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

Solution (Python):
N=int(input())
count=0
def calc(n):
    x=int(n**0.5)+10
    for i in range(2,x):
        count=0
        while n%i==0:
            n=n//i
            count+=1
        if count!=0:
            ans.append([i,count])
for i in range(1,N+1):
    ans=[]
    sum=1
    if i%2==1:
        calc(i)
        for j in range(len(ans)):
            sum*=(ans[j][1]+1)
        if sum==8:
            count+=1
print(count)

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

print(ans)

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

count = 0

for i in range(101,n+1,2):

    cc = 0

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

    if cc == 8:
        count += 1
        cc = 0

print(count)

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

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

Solution (Python):
N = int(input())
odd_count = (N + 1) // 2
odds = [2*i+1 for i in range(odd_count)]

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

Solution (Python):
N = int(input())
 
def count_divisors(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 count_divisors(i) == 8:
        ans += 1
print(ans)

Solution (Python):
n = int(input())
ans = 0
for m in range(1, n+1):
	if m%2 != 1:
		continue
	cnt = 0
	for k in range(1,m+1):
		if m%k == 0:
			cnt += 1
		if cnt>8:
			break
	if cnt == 8:
		
		ans += 1

print(ans)

Solution (Python):
N=int(input())
if N>105:
    ans=1
    for i in range(107,N+1,2):
        g=0
        for j in range(1,i+1):
            if i%j==0:
                g+=1
        if g==8:
            ans+=1
    print(ans)
elif N==105:
    print(1)
else:
    print(0)

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

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

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

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

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

if n <= 104:
    print(0)
    exit()


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

print(count)

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

count = 0
for n in range(105, N+1, 2):
    divi_count = 0
    for divi in range(1, n+1, 2):
        if n%divi == 0:
            divi_count += 1
    if divi_count == 8:
        count += 1
print(count)

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

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

Solution (Python):
N = int(input())
if N < 105:
  print(0)
elif 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 = [105, 135, 165, 189, 195]
print(len([a for a in ans if a <= N]))

Solution (Python):



import math

def allprimes(N):
	primes = []
	for i in range(N):
		primes.append(i+1)
	i = 2
	while i <= math.sqrt(N):
		index = 0
		while True:
			index += 1
			if index == 1:
				continue
			else:
				if index * i <= N:
					
					primes[index*i-1] = 0
				else:
					break
		i += 1
	return sorted(list(set(primes)))[2:]



primes = allprimes(200)

def factor(k):
	
	nprimes = {}
	for prime in primes:
		nprimes[prime] = 0
	for prime in primes:
		if k < prime:
			break
		else:
			while True:
				if k % prime != 0:
					break
				else:
					k = int(k / prime)
					nprimes[prime] += 1
	return nprimes


result = 0
for n in range(int(input())):
	if n+1 == 1 or (n+1) % 2 == 0:
		
		continue
	
	else:
		nps = sorted(factor(n+1).values())
		if nps[:-3:-1] == [7,0] or nps[:-4:-1] == [3,1,0] or nps[:-5:-1] == [1,1,1,0]:
			result += 1

print(result)

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):
import bisect
N=int(input())
l=[105,135,165,189,195]
print(bisect.bisect_right(l,N))

Solution (Python):
from collections import defaultdict
N = int(input())
ans = 0
for i in range(N + 1):
  if i % 2 == 0:
    continue
  t, j, dic, r = i, 2, defaultdict(int), 1
  while True:
    while t % j == 0:
      t /= j
      dic[j] += 1
    j += 1
    if j * j > i:
      break
  if t > 1:
    dic[t] += 1
  for key in dic:
    r *= dic[key] + 1
  if r == 8:
    ans += 1
print(ans)