peterverebics/CodeNet_Python_118 huggingface dataset:
n = int(input())

# 3 5 7 11
# 105 135 165 189 
if n >= 189:
  print(4)
elif n >= 165:
  print(3)
elif n >= 135:
  print(2)
elif n >= 105:
  print(1)
else:
  print(0)
n = int(input())

cnt_2 = 0
if n < 105:
    print(0)

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

print(cnt_2)
n = int(input())
res = 0
for i in range(2,n+1):
  print(i)
s = int(input())
if s <= 104:
  print(0)
elif 105<= s <135:
  print(1)
elif 135<= s <165:
  print(2)
elif 165 <= s <190:
  print(3)
elif 190<= s <195:
  print(4)
else:
  print(5)
N=int(input())

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

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

if n >= 195:
  print(3)
elif n >= 165:
  print(2)
elif n >= 105:
  print(1)
else:
  print(0)
N = int(input())

odd = list()

count_list = list()
count = 0

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

l = len(odd)

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

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

count = 0
for i in range(1, n):
  if i%2 == 1:
    tmp = 0
    for j in range(1, i//2):
      if i%j == 0:
        tmp+=1
    if tmp == 4:
      count+=1
print(count)
N = int(input())
if N < 105:
    print(0)
else:
    ans = 1
    for a in range(106, N+1):
        tmp = 1
        for b in range(2, a//2+1):
            if a % b == 0:
                tmp += 1
        if tmp == 8:
            ans += 1
    print(ans)
N = int(input())
cnt=0
y=[]

for i in range(1,N+1,2):
    for j in range(1,i+1):
        if i%j == 0:
            y.append(j)
    if len(y)==8:
        cnt += 1
        y.clear()
print(cnt)
i = int(input())

for n in range(1,i+1,2):
  ans = 0
  r = 0
  for m in range(1,n+1):
    if n % m == 0:
      ans += 1
  if ans == 8:
    r = n
    print(r)
if r == 0:
  print(r)
n = int(input())
cnt = 0
for i in range(1,n+1):
    if n % i == 0:
        cnt += 1
print(1 if cnt== 8 else 0)
n = int(input())
ans_list = [i for i in range(n+1) if i%2!=0]
ans = 0
for i in ans_list:
  for j in range(1,n+1):
    count = 0
    if i%j == 0:
      count += 1
    if count == 8:
      ans +=1
print(ans)
n = int(input())
g = 0
ans = 0
for i in range(1,n+1):
    for j in range(i):
        j = j +1
        if n % j == 0:
            g += 1
    if g == 9:
        ans += 1
print(ans)
# coding: utf-8

num = int(input())
if num == 105:
  print(1)
else:
  print(0)
N=int(input())

ans = 0
count = 0
for i in range(1,N+1):
  if i%2==1:
    for j in range(1,i+1):
      if i%j==0:
        ans += 1
    if ans == 8:
      count += 1
print(count)
import numpy as np
n = int(input())
ans = 1
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 == 7):
            ans+=1
print(ans)
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:
        print(i)
        count += 1
else:
    print(count)
N=int(input())
if N<105:print(0)
else:
    ans=0
    for i in range(105,N+1):
        count=0
        for j in range(1,N+1):
            if i%j==0:count+=1
        if count==8:
            ans+=1
    print(ans)
N = int(input())
ans = 0
for i in range(1,N+2,2):
    cnt = 0
    for j in range(1,i+1):
        if i % j == 0:
            cnt += 1
    if cnt == 8:
        ans += 1

print(ans)
n = int(input())

ret = 0


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

def countDividers(n):
    divisors = []
    for i in range(1, int(math.sqrt(n))):
        if n % i == 0:
            divisors.append(i)
            divisors.append(int(n/i))
    return len(divisors)

if __name__ == '__main__':
    n = int(input())
    count = 0
    for i in range(1,n+1):
      if countDividers(i) == 8:
        count += 1
    print(count)
n = int(input())
if(n < 105):
    print(0)
elif(105 <= n < 135):
    print(1)
elif(135 <= n < 165):
    print(2)
elif(165 <= n < 195):
    print(3)
else:
    print(4)
n = int(input())

count = 0
for i in range(1, n+1):
  if i%2 == 1:
    tmp = 0
    for j in range(1, i//2+1):
      if i%j == 0:
        tmp+=1
    if tmp == 4:
      count+=1
print(count)
N = int(input())
ans = 0
for n in range(1, N+1):
  yakusuu = 0
  for i in range(1, n+1):
    if n%i==0:
      yakusuu+=1
  if yakusuu==8:
    ans += 1
print(ans)
import math
n = int(input())

ans = 0

for i in range(1, n+1):
    count = 0
    if i % 2 == 1:
        for j in range(1, int(math.sqrt(i))):
            if i % j == 0 and j * j != i:
                count += 1
        if count == 4:
            ans += 1

print(ans)
# -*- coding: utf-8 -*-
"""
Created on Fri May  8 01:14:23 2020

@author: Kanaru Sato
"""
import math

N = int(input())
ans = 0

for n in range(1,N+1):
    if n%2 != 0:
        count = 0
        for i in range(1,int(math.sqrt(n))+1):
            if i != int(math.sqrt(n)) and n % i == 0:
                count += 2
            if i == int(math.sqrt(n)) and n % i == 0:
                count += 1
        if count == 8:
            ans += 1

print(ans)
import math
N=int(input())
ans=0
for i in range(1,N+1,2):
    temp=0
    for j in range(1,math.floor(math.sqrt(i))):
        if i%j==0:
            temp+=2
    if temp==8:
        ans+=1
print(ans)
n = int(input())
ans = 0
A = [i for i in range(n+1)]
A = A[1:n+1:2]
for i in range(len(A)):
    a=0
    for j in range(len(A)//2+1):
        if A[i] % (j+1) == 0:
            a += 1
    if a == 8:
        ans += 1
print(ans)
N=int(input())
count = 0
count2 = 0
for i in range(1,N+1):
    #print(i,"i")
    for j in range(1,N+1):
        #print(j,"k")
        if i % j == 0 :
            count += 1
            #print(count,"count")
    if count == 8 and i%2 != 0:
        count2 += 1
    ans = count2
    count = 0
    count2 = 0
print(ans)
import sys
stdin = sys.stdin
import itertools

mod = 10**9 + 7

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))

n = ni()
ans = 0
for m in range(1, n+1, 2):
    s = set()
    for i in range(1, int(m**0.5)):
        if m % i == 0:
            s.add(i)
            s.add(m//i)
    if len(s) == 8:
        ans += 1
print(ans)
N=int(input())
count = 0
count2 = 0
for i in range(1,N+1):
    #print(i,"i")
    for j in range(1,N+1):
        #print(j,"k")
        if i % j == 0 :
            count += 1
            #print(count,"count")
    if count == 8:
        count2 += 1
    ans = count2
    count = 0
    count2 = 0
print(ans)
N = int(input())
prime = [3,5,7,11] #9は素数ではない！
count = 0
#x^1, y^1,z^1の場合
for i in range(4):
    for j in range(i+1, 4):
        for k in range(j+1, 4):
            if prime[i]*prime[j]*prime[k] <=N:
                count += 1

#x^3, y^1の場合
for i in range(4):
    for j in range(i+1, 4):
        if prime[i]**3 * prime[j] <= N:
            count+= 1
print(count)
_=input();r=0 if _=="7"else int(_[0:2])//3-3;print(r)
n=int(input())
l=[]
for i in range(105,n+1):
  c=0
  for j in range(1,i+1):
    if i%j==0:
      c+=1
  if c==8:
    l.append(i)
print(len(l))
n = int(input())

if n < 105:
    print(0)
elif n == 105:
    print(1)
else:
    ans = 120
    for i in range(106, n+1):
        count = 0
        for j in range(1, i):
            if i%j == 0:
                count += 1
        if count==8:
            ans+=1
    print(ans)
n = int(input())


def 約数(n):
	count = 0
	for i in range(2,n):
		while n%i == 0:
			n /= i
			count += 1
	if count == 8:
		return True
	else:
		return
if n == 105:
	print(1)
elif n < 105:
	print(0)
else:
	ans = 1
	for i in range(106,n+1):
		if i%2 !=0:
			if 約数(i):
				ans += 1


	print(ans)
import sys

def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

N = I()

if N < 105:
    print(1)
    exit()

ans = 0
for i in range(105,N+1,2):
    cnt = 0
    for q in range(1,int(i**0.5)+1):
        if i % q == 0:
            cnt += 2
    if cnt == 8:
        ans += 1
print(ans)
n = input()
if(n == '105'):
  print(1)
else:
  print(0)
n = int(input())
if n >= 105: #3*5*7 = 105
    print(1)
elif n >= 135: #3*5*9 = 135
    print(2)
elif n >= 165: #3*5*11 = 165
    print(3)
elif n >= 189: #3*7*9 = 189
    print(4)
elif n >= 195: #3*5*13 = 195
    print(5)
else:
    print(0)
n = int(input())

count = 0
for i in range(1, n):
  if i%2 == 1:
    tmp = 0
    for j in range(1, i//2+1):
      if i%j == 0:
        tmp+=1
    if tmp == 4:
      count+=1
print(count)
import sys

def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

N = I()

if N < 105:
    print(1)
    exit()

ans = 0
for i in range(105,N+1,2):
    cnt = 0
    for q in range(1,int(N**0.5)+1):
        if i % q == 0:
            cnt += 2
    if cnt == 8:
        ans += 1
print(ans)
n = int(input())
if n < 105:
    print(0)
    exit()
elif n == 105:
    print(1)
    exit()
else:
    num = 1
    for i in range(107, n, 2):
        count = 0
        for j in range(1, i):
            if i % j == 0:
                count += 1
        if count == 8:
            num += 1
print(num)
n=int(input())
cnt=0

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

for i in range(n+1):
  if len(make_divisors(i))==8:
    cnt+=1
print(cnt)
n= int(input())
ans = 0
for i in range(1,n+1):
    count = 0
    for j in range(1,i+1):
        if n%j ==0:
            count +=1
    if count == 8:
        ans +=1
print(ans)
n = int(input())

if n < 105:
    print(0)
elif n == 105:
    print(1)
else:
    ans = 1
    for i in range(106, n+1):
        count = 0
        for j in range(1, i):
            if i%j == 0:
                count += 1
        if count==8:
            ans+=1
    print(ans)
N = int(input())
cnt,lcnt = 0,0

for i in range(1,N+1):
  for j in range(1,i+1):
    if i%j == 0:
      cnt += 1
      if cnt == 8:
        lcnt += 1
        cnt = 0
print(lcnt)
import sys
from itertools import combinations
import math


def I(): return int(sys.stdin.readline().rstrip())


def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))


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


def LS(): return list(sys.stdin.readline().rstrip().split())


N = I()
ans = 0
if N >= 105:
    for i in range(105, N+1, 2):
        yakusu = 0
        for q in range(1, N+1):
            if N % q == 0:
                yakusu += 1
        if yakusu == 8:
            ans += 1
print(ans)
n=int(input());print((n-75)//30+int(n>188))
N=int(input())
ans=0
for n in range(1,N+1):
  _ans=0
  for x in range(1,n+1):
    if n%x==0:
      _ans+=1
  if _ans==8:
    ans+=1
print(ans)
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)

    # print(divisors)
    return divisors

ans = 0

for i in range(1, n+1):
    if len(make_divisors(i)) == 8:
        ans += 1

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

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


if __name__ == "__main__":
    main()
n = int(input())
count = 0
for i in range(1,n+1):
  if n%i == 0:
    count = count + 1
print(count)
n = int(input())
c = 0
a = [105,165,195]
if (n<105):
    print(0)
elif (105<=n and n<165):
    print(1)
elif (n >= 195):
    print(3)
else:
    print(2)
n = int(input())

if n < 105:
    print(0)
    exit()
elif n == 105:
    print(1)
    exit()
else:
    num = 1
    for i in range(107, n, 2):
        count = 0
        for j in range(1, n):
            if i % j == 0:
                count += 1
        if count == 8:
            num += 1
print(num)
n = int(input())

ans = 0
for i in range(1,n+1):
    g = 0
    for j in range(1,i+1):
        if n % j == 0:
            g += 1
          
        if g == 8:
            ans += 1
print(ans)
# -*- coding: utf-8 -*-

def main():

    N = int(input())

    ans = 0
    count = 0

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


if __name__ == "__main__":
    main()
N = int(input())
B = 0
for i in range(N):
  A = 0
  n = int((i+1)**(1/2))
  for j in range(n):
     if (i+1) % (j+1) == 0:
        A += 1
  if A == 4 and (i+1) % 2 == 1:
    print(i+1)
    B += 1
print(B)
N = int(input())

ans = 0
for i in range(1, N + 1):
    if i % 2 != 0:
        c = 0
        for j in range(1, N + 1):
            if i % j == 0:
                c += 1
    if c == 8:
        ans += 1
print(ans)
n = int(input())
ans = 0
for i in range(1,n+1,2):
         yakusu = 0
         for j in range(2,n):
                  if i % j == 0:
                           yakusu += 1
         if yakusu == 6:
                  ans += 1
print(ans)
N = int(input())
ans = 0
for i in range(1, N+1):
  a = 0
  for j in range(1, i+1):
    if i % j == 0:
      a += 1
  if a == 8:
    ans += 1
print(ans)
n = int(input())
arr = []
for i in range(1, n + 1):
  a = []
  for j in range(1, i + 1):
    if n % j == 0:
      a.append(j)
  if len(a) == 8:
    arr.append(i)
print(len(arr))
N = int(input())

ans = 0
for n in range(1,int(N/2)+1):
    for i in range(1,int(N**(1/2)/2)+1):
        for j in range(i+1,int(N**(1/2)/2)+1):
            for k in range(j+1,int(N**(1/2)/2)+1):
                if 2*n+1 == (2*i+1)*(2*j+1)*(2*k+1):
                    ans += 1

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

if n >= 105:
    print(1)
else:
    print(0)
n = int(input())

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

    # divisors.sort()
    return divisors
result = 0

for i in range(1,n+1,2):
    if i > 200:
        break
    print(i)
    if len(make_divisors(i)) == 8:
        result += 1
    

print(result)
def main(n):
    ans = 0
    p = [i for i in range(1, n + 1) if n % i == 0]

    if len(p) == 8:
        print(1)
    else:
        print(0)


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

    main(n)
n = int(input())
odd = []
ans = []
l = []
for s in [i for i in range(1,n+1) if i % 2 == 1]:
  for i in range(1,int(s**0.5)+1):
    if s % i == 0:
        l.append(i)
    if len(l)==8:
        ans.append(s)
ans = set(ans)
print(len(ans))
#A = list(map(int, input().split()))
N = int(input())
ans = 0
if N>=195:
    ans = 4
elif N>=165:
    ans = 3
elif N>=135:
    ans = 2
elif N>=105:
    ans = 1
print(ans)
n = int(input())

count = 0

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

print(count)
n=int(input())
cnt=0
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

if n<105:
  print(0)

else:
  for i in range(105,n+1):
    if len(make_divisors(i))==8:
      cnt+=1
  print(cnt)
n=int(input())
ans=0
l=[i for i in range(1,n+1) if i%2==1]
for i in l:
    cnt=0
    for j in range(1,i//2):
        if i%j==0:
            cnt+=2
    if cnt==8:
        ans+=1
print(ans)
N = int(input())

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

    if cnt == 8:
        cnt2 += 1

print(cnt2)
s = int(input())
if s < 104:
  print(0)
elif 105<= s <135:
  print(1)
elif 135<= s <165:
  print(2)
elif 165 <= s <190:
  print(3)
elif 190<= s <195:
  print(4)
else:
  print(5)
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:
        ans += 1

print(ans)
N = int(input())
cnt = 0
ans = 0
if N < 105:
  print(0)
elif N == 105:
  print(1)
else:
  for i in range(106,N+1):
    for j in range(1,i+1):
      if i%j == 0:
        cnt += 1
    if cnt == 8:
      ans += 1
  print(ans)
n = int(input())
if n < 105:
    print(0)
    exit()
total, count = 0,0
for i in range(1, n+1, 2):
    for j in range(1, i+1):
        if i % j == 0:
            count += 1
    print(count)
    if count == 8:
        total += 1
    count = 0
print(total)
def make_divisors(n):
    ans=0
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            ans+=1
            if i != n // i:
                ans+=1
    return ans

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

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

    # divisors.sort()
    return divisors
result = 0

for i in range(1,n+2,2):
    #print(i)
    if len(make_divisors(i)) == 8:
        result += 1

print(result)
n = int(input())

if n >= 105:
  print(1)
else:
  print(0)
import math

def countDividers(n):
    divisors = []
    for i in range(1, int(math.sqrt(n))):
        if n % i == 0:
            divisors.append(i)
            divisors.append(int(n/i))
    return len(divisors)

if __name__ == '__main__':
    n = int(input())
    print(countDividers(n))
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
    print(i,cnt)
    if cnt == 8:
        ans += 1

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

if (n < 105):
    ans = 0
elif (n == 105):
    ans = 1

else:
    ans = 1
    for i in range(106, n + 1, 2):
        data = [1]
        for j in range(2, i+1):
            if (i % j == 0):
                data.append(j)

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

print(ans)
N = int(input())
c = 0
for  i in range(1,N+1):
  li = []
  if i < 10:
    continue
  else:
    k = i
    for j in range(2,int(i**(0.5)+3)):
      d = 1
      while k % j == 0:
        k = k/j
        d += 1
      if d != 1:
        li.append(d)
    ss = 1
    for x in li:
      ss *= x
    if ss == 8:
      #print(i)
      c += 1
    
print(c)
N = int(input())

cnt=0
ans=0

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

print(ans)
a=int(input())
if a<=104:
    ans=0
elif a<165:
    ans=1
elif a<195:
    ans=2
else:
    ans=3
print(ans)
N = int(input())

if N < 105:
  print(0)
else:
  ans = 0
  for i in range(105, N + 1, 1):
    y = 0
    for j in range(1, i + 1, 1):
      if i % j == 0:
        y += 1
    else:
      if y == 8:
        ans += 1
  else:
    print(ans)
n = int(input())
ans = 0
for i in range(1,n+1,2):
    sm = sum(n % i == 0 for i in range(1,i+1))
    if sm == 8:
        ans += 1
print(ans)
def divisor_all(n): # 約数全列挙
    l = [1,n]
    for i in range(2,int(pow(n,1/2))+1):
        if n % i == 0:
            if i == n//i:
                l.append(i)
            else:
                l.append(i)
                l.append(n//i)
    l.sort()
    return l # list
N = int(input())
ans = 0
for i in range(1,N+1):
    if len(divisor_all(i))==8:
        ans += 1
print(ans)
n = int(input())

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

print(res)
n = int(input())
count = 0

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

print(count)
N = int(input())
N_odd = 0 

if N % 2 != 0:
    N_odd = N
    
cnt = 0
odd_list = []

for i in range(201):
    if i % 2 != 0:
        odd_list.append(i)

#print(odd_list)
for i in odd_list:
    if N_odd % i == 0:
        cnt += 1
print(cnt // 8 )
n = int(input())

if n < 105:
  print(0)
else:
  if n < 165:
    print(1)
  else:
    print(2)
import sys
import re
from decimal import *

l = sys.stdin.readline()
#l = l.split(' ')
#l = [int(str) for str in l]
n = int(l)

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

print("0")

sys.stdout.flush()
import math
def countYakusu(n):
  count = 0
  for i in range(n):
    if n % (i+1) == 0:
      count = count + 1
  return count == 8

N = int(input())
count = 0
for i in range(math.floor(N/2)+1):
  count = count + countYakusu(i*2+1)
print(count)
N = int(input())
prime = [3,5,7,9,11]
count = 0
#x^1, y^1,z^1の場合
for i in range(5):
    for j in range(i+1, 5):
        for k in range(j+1, 5):
            if prime[i]*prime[j]*prime[k] <=N:
                count += 1

#x^3, y^1の場合
for i in range(5):
    for j in range(i+1, 5):
        if prime[i]**3 * prime[j] <= N:
            count+= 1
print(count)
N = int(input())

ans = 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:
        ans += 1
print(ans)
N=int(input())
if N<105:
  print(0)
  exit()
cnt=1
for i in range(107,201,2):
  tmp=0
  for j in range(2,int(i**0.5)):
    if i%j==0:
      tmp+=2
  if tmp==8:
    cnt+=1
print(cnt)
n = int(input())

cnt = 0
for i in range(1, n+1, 2):
  if n%i == 0:
    cnt += 1
    
print(cnt//8)
n = int(input())
cnt = 0
l = []
for i in range(1, n+1):
    if i % 2 == 1:
        for d in (1, i+1):
            if i % d == 0:
                l.append(d)
        if len(l) == 8:
            cnt += 1
print(cnt)
N = int(input())

ans = 0
for n in range(1,int(N/2)+1):
    if 2*n+1 > N:
        break
    for i in range(1,int(N**(1/2)/2)+1):
        for j in range(i+1,int(N**(1/2)/2)+1):
            for k in range(j+1,int(N**(1/2)/2)+1):
                if 2*n+1 == (2*i+1)*(2*j+1)*(2*k+1):
                    print(i,j,k,n)
                    ans += 1

print(ans)
N = int(input())

ans = 0

if N >= 105:
  ans += 1
if N >= 165:
  ans += 1
if N >= 195:
  ans += 1
  
print(ans)
n = int(input())
cnt = 0
for i in range(1, n, 2):
    if n % i == 0:
        cnt += 1
if cnt == 8:
    print(1)
else:
    print(0)
n = int(input())
ans = 0
oddl = list(map(int, (i for i in range(1, n, 2))))


def eight(n):
    i = 1
    cnt = 0
    while i <= n:
        if n % i == 0:
            cnt += 1
        i += 1
    if i == 8:
        return 1
    else:
        return 0


for i in oddl:
    ans += eight(i)
print(ans)