peterverebics/CodeNet_Python_118 huggingface dataset:
x = int(input())
import math

steps = 1
X = x

a,b = math.sin((22*x)/(7*180)),math.cos((22*x)/(7*180))
while True:
    # print(x,a,b)
    x = (x+X)
    r = (22*x)/(7*180)
    a = a + math.sin(r)
    b = b + math.cos(r)
    steps+=1
    if a<10**-6 and b<10**-6:
        break
    
    
print(steps+1)
import math
x=int(input())
if 360%x==0:
    print(360//x)
else:
    print(x * 360 // math.gcd(x, 360))
def times(X):
    if X == int(X):
        if 1<= X <= 179:
            K = 360/X
            if int(K) < K :
                K = int(int(K) + 1)
                print(K)
            else:
                K = int(K)
                print(K)
X = int(input())
if 360 % X == 0:
  print(int(360 / X))
else:
  total = 360
  while(True):
    if total % X == 0:
      break
    else:
      total += 360
  print(int(360 / X))
X = int(input())
print(361 if 360 % X else 360 // X)
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    X = int(input())

    if X < 60:
        X = 180 - X
    for n in range(3, 100000):
        s = 180 * (n - 2)
        d, m = divmod(s, n)
        if not m and d == X:
            print(n)
            break


main()
k = list(map(int,input().split()))
print(int(360//k[0]))
n = int(input())
if 360%n:
    print(360//(360%n))
else:
    print(360//n)
import math
x=int(input())
if x<=360:
  print(int(360/x))
else:
  y=x%360
  print(int(360/y))
import math

delta=int(input())
theta=90+delta
dist= 1
x,y=0,1
count=1
while(round(dist)!=0):
    rad= theta*math.pi/180
    vx= math.cos(rad)
    vy=math.sin(rad)
    x+=vx
    y+=vy
    dist= math.sqrt(x*x+y*y)
    count+=1
    theta=(theta+delta)%360
print(count)
X = int(input())
n = 360
while(1):
  if n%X == 0:
    print(int(360/X))
    break
  n = n + 360
x  = int(input())
if 360 % x == 0:
	print(360//x)
else:
	print((360//x)*5)
X = int(input())
ans = 360 / X
print(int(ans))
x = int(input())
k = 360 / x
out = None
for l in range(1, 181):
  if (k * l).is_integer():
    out = k * l
    break
print(out)
degree = float(input())
max_num = 360

if(1 <= degree <= 179 and degree.is_integer() == True):
    answer = max_num / degree
    print(answer)
elif(degree.is_integer() == False):
    print(False)
else:
    print(False)
x = int(input())

k = 4
if x <= 90:
    k = 360/x
else:
    k = 360/ (180-x)

k = int(k)
print(k)
import math
n=int(input())
n=180-n
ans=360//(180-n)
print(ans)
x = int(input())
y = 360 / x
print(int(y))
x = int(input())
if 360 % x == 0:
    print(360//x)
else:
    print(360//abs(360-x))
import math
n=int(input())
n=180-n
ans=math.ceil(360/(180-n))
print(ans)
import math
X = 1
t = 360 - (180 - X)
g = math.gcd(t, 360)
print(360 * t // g // t)
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7

X = i()
print(360//X)
from math import gcd

def lcm(a, b):
    return (a * b) // gcd(a, b)

n = int(input())
if n > 90:
    n = 180 - n

x = lcm(n, 360)

print(x // n)
k = int(input())
if 1 <= k <= 179:
  num = 360 / k
  if isinstance(num, int):
  	print(num)
  else:
    print(360 * k)
x = int(input())
print(int(360/x)) if 360%x == 0 else print(int(360/x)+1)
import math
x=int(input())
if x==60:
  print(3)
else:
  print(360//math.gcd(x,180))
X=int(input())
a=360%X
if a==0:
  print(a)
else:
  print(360)
x=int(input())
if 360%x==0:
  print(360//x)
else:
  print(0)
x = int(input())

ans = 360 / x

if ans - int(ans) != 0:
    print(int(ans) + 1)
else:
    print(int(ans))
degree = int(input())
max_num = 360

if(1 <= degree <= 179):
    answer = max_num / degree
    print(answer)
else:
    print('out of range')
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10**6)
from math import gcd,ceil

def lcm(a,b):return a*b//gcd(a,b)
x=int(input().rstrip())
print(360//x if 360%x==0 else ceil(360/x)*(lcm(360,x)//360))
#: Author - Soumya Saurav
import sys,io,os,time
from collections import defaultdict
from collections import OrderedDict
from collections import deque
from itertools import combinations
from itertools import permutations
import bisect,math,heapq
alphabet = "abcdefghijklmnopqrstuvwxyz"

input = sys.stdin.readline

########################################

x = int(input())
if x <= 90: print(math.ceil(360//x))
else: print(math.ceil(360/(180-x)))
x = input("")
for i in range(5):
    alist = list(map(int,x))
    result = sum(alist)
    x = str(result)

if result % 9 == 0 :
    print("yes")
else:
    print("no")
def times(X):
    if int(X)/X == 1:
        if 1<= X <= 179:
            K = 360/X
            if int(K) < K :
                K = int(K) + 1
                print(K)
            else:
                print(int(K))
        else:
            print("please input another number")
    else:
        print("please input an integet")
times(90)
import sys
x = int(input())
y = 0
m = 1
if 360 % x == 0:
    m = int(360 / x)
else:
    for i in range(1, 360):
        y = x * i
        if y > 360:
            if y % 360 == 0:
                m = i
                break
                
print(m)
x=float(input())
actions=float(360/x)
print(float(actions))
import sys
input = sys.stdin.readline

def inp():
    return(int(input()))

x = inp()
print(360//x)
n=int(input())
#n*k1=(360)*k2
#(k1/k2)=(360/n)
k=1
while((k*n)%360!=0):
  k+=1
  print(k)
x = int(input())
ans = 360 // x
if 360 % x != 0: ans += 1
print(ans)
x  = int(input())
if 360 % x == 0:
	print(360//x)
else:
	print((360//x)*10)
x = int(input())
if 360%x != 0:
    print(360//x + 1)
else:print(int(360/x))
import sys
import math
input = sys.stdin.readline
ins = lambda: input().rstrip()
ini = lambda: int(input().rstrip())
inm = lambda: map(int, input().split())
inl = lambda: list(map(int, input().split()))

n = ini()
print(math.ceil(360 // n))
x = int(input())
if(360%x == 0):
  print (360//x)
else:
  
  print((360//x)+1)
X = int(input()) 
q1 = 360/X

if X == 60:
  print(3)
else:
  print(int(q1))
x = int(input())
if 360%x == 0:
    print(360//x)
else:
    print(180)
degree = float(input())
max_num = 360

if(1 <= degree <= 179 and degree.is_integer() == True):
    answer = round(max_num / degree)
    print(answer)
else:
    print(False)
x = int(input())
for n in range(3, 361):
   if n * (180 - x) == 180 * (n - 2):
      print(n)
      exit()
import numpy as np
X = int(input())
a = ()
b = ()

for i in range(1,360): 
	a += np.sin(X * i)
	b += np.cos(X * i)
	if a == 0 and b == 0: 
		break
print(i)
def main():
    X = int(input())
    ans = int(360/X)
    return ans

print(main())
k = int(input())
if 360%k == 0:
    print(360//k)
else:
    print(360*k)
x = int(input())
for i in range(1,1000):
    if 360*i%x == 0 :
        print(int(360/x))
        break
    else :
        print(3)
        pass
X = int(input()) 
q = 360//X
mod = 360 % X

if mod > 0:
  print(q * (mod+1))

else: print(q)
x = int(input())

y = 180-x

z = 180-y

print(int(360/z))
X = int(input())
for i in range(361):
  if i*X == 360:
    print(i)
    break
from math import gcd
x=int(input())
g=gcd(x,360)
print(x//g)
#dt = {} for i in x: dt[i] = dt.get(i,0)+1
import sys
input = sys.stdin.readline
ipnl = lambda n: [int(input()) for _ in range(n)]
inp = lambda :int(input())
ip = lambda :[int(w) for w in input().split()]

x = inp()
print(360//x)
x = int(input())
if 1 <= x <= 179:
  num = 360 / x
  if isinstance(num, int):
  	print(num)
  else:
    print(360 * x)
n=int(input())
if(360%n==0):
  print(360//n)
else:
  print(360//n + 1 )
S=input()
S=int(S)

if 360%S==0:
    print(int(360/S))
    
else:
    print(360)
def E(N,R):
    if int(N)==N and int(R)==R:
        if 1<= N <= 100 and 0<= R <= 4111:
            if N > 10:
                M =R
                print(M)
            else:
                K = 100 * (10 - N)
                M = R + K
                print(M)
import math

x = int(input())
y = 360

lcm = x * y // math.gcd(x, y)
print(lcm/x)
import math
import string

x = float(input())
k = 360/x

print(math.floor(k))
x = int(input())
print(360//x if 360%x==0 else 360//x+1)
import collections
import itertools
def gcd(a,b):
    if(a%b==0):
        return b
    else:
        gcd(b,a%b)
def main():
    n = int(input())
    #a*n = k*360である最小のa,k
    l = 360
    i = 1
    while(l%n!=0):
        l*=i
        i+=1
    print(l//n)





if __name__ == '__main__':
    main()
k = int(input())
if 0 <= k <= 179:
  num = 360 / k
  if isinstance(num, int):
  	print(num)
  else:
    print(360)
from sys import stdin, stdout
for _ in range(1):#int(stdin.readline())
    n=int(stdin.readline())
    print(360//n if 360%n==0 else 0)
import sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()

def main():
    X = ii()
    for k in range(1,361):
        if k*(180-X) == 180*(k-2):
            print(k)
            exit()



if __name__ == "__main__":
  main()
def resolve():
    X = int(input())
    k = 0
    while 1:
        k += 1
        cal = X * k
        if cal // 360:
            break
    print(k)
    

if __name__ == "__main__":
    resolve()
from math import ceil 

x = int(input())
ans = ceil(360/x)
print(ans)
x = int(input())

for k in range(1, 10000):
    if (180-x)*k % 360 == 0:
        print(k)
        break
#dt = {} for i in x: dt[i] = dt.get(i,0)+1
import sys
input = sys.stdin.readline
ipnl = lambda n: [int(input()) for _ in range(n)]
inp = lambda :int(input())
ip = lambda :[int(w) for w in input().split()]

x = inp()
ans = 360//x
if 360%x == 0:
    print(ans)
else:
    print(2*ans +1)
import math as m
x = int(input())
print(m.ceil(360/x))
X=int(input())
if 360%X==0:
  print(360//X)
else:print(int(360/X)+1)
X = int(input())
K = 360//X
if 360%X==0:
  print(K)
else:
  print(K+1)
x = int(input())
import math
a = -(-360//x)
b = math.gcd((x*a)%360,360)
print(a*b)
x=int(input())
a=360/x;
if(int(a)==a):
  print(a)
else:
  print(int(a)+1)
x=int(input())
for i in range(1,361):
  if (i*x)%360==0:
    print(i)
import math
n=int(input())
ans=math.ceil(n/360)
print(ans)
x = int(input())

ans = 360 // x
x = 360 % x

while x != 0:
    ans += 360 // x
    x = 360 % x

print(ans)
a = list(map(int, input().split()))
if 360 % a[0] == 0:
  print(int(360 / a[0]))
else:
  print(360)
import math
x = int(input())
if x <= 90: print(math.ceil(360//x))
else: print(math.ceil(360//(180-x)))
x=int(input())
if 360%x==0:
 print(360//x)
else:
 print(0)
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10**6)
from math import gcd

def lcm(a,b):return a*b//gcd(a,b)
x=int(input().rstrip())
print(360//x if 360%x==0 else 360//x*(lcm(360,x)//360))
x = int(input())
for i in range(1, 360):
    if (x*i)%360 == 0:
        print(i)
        exit()
from math import gcd

X = int(input())

print(360//gcd(X,180))
import math

delta=180-int(input())
print(round((delta*360/math.gcd(delta,360))/delta))
x = int(input())

wk = 360 // x
while True:
    if 360 % wk != 0:
        wk += 1
    else:
        print(wk)
        exit(0)
a=int(input())
for i in range(1,361):
  if a*i==360:
    print(str(int(i)))
    break
  else:
    for j in range(1,361):
     if a*i/j==180:
      print(str(int(j*i)))
      break
     else:
       pass
import math
a = int(input())
print(math.ceil(360 / a))
x = int(input())

for i in range(1,361):
  if x*i==360:
    print(i)
    break
#!/usr/bin/env python
"""AtCoder Grand Contest 046: A - Takahashikun, The Strider
https://atcoder.jp/contests/agc046/tasks/agc046_a
"""


def main():
    X = int(input())
    print(360//X)


if __name__ == '__main__':
    main()
n=int(input())
if(n>90):
  n-=90
print(360//n)
import sys
import math

x=int(input())
if(x>90):
    x=x-90
print(math.ceil(360/x))
import math

def lcm(x, y):
    return (x * y) // math.gcd(x, y)
  
x=int(input())
num=lcm(x,360)
print(num//360)
import math
X = int(input())
if 360%X==0:
  print(360//X)
else:
  remainder = 360%X
  k = int(math.gcd(remainder,X))
  count = int(360//X)
  i = 0
  r = remainder
  while i<k:
    count+=(((360+r)-7)//7)
    r = (r+remainder)%remainder
    i+=1
  print(count+(k//3))
degree = int(input())
need = 360 / degree
print(int(need))
import math
X = int(input())

if 360 % X == 0:
    ans = 360 // X
else:
    if X <= 90:
        x = X
    else:
        x = X - 90

    ans = (360 * x) // math.gcd(360, x)

print(ans)
x = int(input())
n = 360
for i in range(1,n):
  if (x*i)%360 == 0:
    print(i)
    exit()
a = int(input())

x = a
i = 1

while x % 180 != 0:
    x += a
    i += 1

print(i*2)
X = int(input())

if 360 % X == 0:
	ans = 360 // X
else:
	if X > 90:
		ans = 360 // (180 - X)
	else:
		ans = 0
print(ans)
X=int(input())
for i in range (361):
    if X*i%360==0:
        print(i)
X = int(input()) 
q = 360//X
mod = 360 % X

if mod > 0:
  print(q * mod)

else: print(q)
import math

x = int(input())

K = 360 / x
y = type(K)
if y == float:
    print(math.ceil(K))
else:
    print(K)
X=int(input())
K=0
a=0
while True:
  a+=X
  K+=1
  if K%360==0:
    break
print(K)
x = float(input())
max_num = 360

if(1 <= x <= 179 and x.is_integer() == True):
    k = abs(round(max_num / x))
    print(k)
else:
    print(False)
x = int(input())
if(x>179):
 k =int(360/x)%360 
 if k == 0:
  print(int(360/x))
x=int(input())
t=x
if(360%x==0):
    print(360//x)
else:
    count=0
    while(x!=360):
        x+=t
        if(x>360):
            x=x-360
            t=x
        count+=1
    print(count-1)
import math

theta = int(input())
if 360%theta == 0:
    print(360//theta)
else:
    gcdiv = math.gcd(theta,360)
    kotae = ((360//gcdiv) * (theta//gcdiv))
    print(kotae)
x = int(input())
import math
a = -(-360//x)
b = math.gcd((x*a)-360,360)
print(a*(360//b))
import math
x = int(input())
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
if x == 1:
  print(360 / x)
elif x == 45:
  print(360 / x)
elif x == 90:
  print(360 / x)
else:
  z = lcm(x, 360)
  print(int(z / x))
import math, sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from copy import deepcopy
from functools import lru_cache
from heapq import heapify, heappop, heappush
from itertools import accumulate, combinations, permutations
input = sys.stdin.readline
mod = 10**9 + 7
ns = lambda: input().strip()
ni = lambda: int(input().strip())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

def main():
    x = ni()

    print(360//x)


if __name__ == '__main__':
    main()
n = int(input())

if 360 % n == 0:
    print(360 // n)
else:
    print(720/(180-n))
import sys
import math
def input(): return sys.stdin.readline().rstrip()
def main():
    x = math.radians(int(input()))
    cur_x, cur_y = 0, 1
    cur_dig = math.pi/2
    ans = 1
    while cur_x**2+cur_y**2>0.01:
        cur_dig += x 
        cur_x += math.cos(cur_dig)
        cur_y += math.sin(cur_dig) 
        ans += 1
    print(ans)

if __name__=='__main__':
    main()
x=int(input())
import math
y=x*360/math.gcd(x,360)
print(y/x)
x = int(input())
def divisor(n): 
    i = 1
    table = []
    while i * i <= n:
        if n%i == 0:
            table.append(i)
            table.append(n//i)
        i += 1
    table = list(set(table))
    return table
t = divisor(360)
m = 0
for a in t:
  m = min(m, abs(a-x))
if m==0:
  print(360//x)
else:
  print(360//m)
a=int(input())
for i in range(1,361):
  if a*i==360:
    print(str(int(i)))
    break
  else:
    pass

print('0')
import math
x=int(input())
if 360%x==0:
  print(360//x)
else:
  k=0
  xt=x
  p=[0,1]
  for i in range(1,1000):
    xt+=x
    rad=xt/180*math.pi
    p[0]+=-math.sin(rad)
    p[1]+=-math.cos(rad)
    if math.isclose(p[0], 0, abs_tol=1e-10) and math.isclose(p[1], 0, abs_tol=1e-10):
      break
  if i==999:
    print(0)
  else:
    print(i)
a=int(input())
for i in range(1,361):
  if a*i==360:
    print(str(int(i)))
    break
  else:
    print(0)
x=int(input())
if 360%x==0:print(360//(x))
else:print(360//(180-x))
def lcm(x, y):
   if x > y:
       greater = x
   else:
       greater = y
 
   while(True):
       if((greater % x == 0) and (greater % y == 0)):
           lcm = greater
           break
       greater += 1
 
   return lcm
 
 
 
num1 = int(input())
a=lcm(num1,360)
b=a/360
print(int(b))
def main():
    x = int(input())
    print(360 // x)

if __name__ == '__main__':
    main()
x=180-int(input())
if 360%x==0:
  print(360//x)
else:
  print(360)
X=int(input())
i=1
while True:
  X=X*i
  if X%360==0:
    print(i)
    break
  i+=1
def times(x):
    x = int(x)
    if 1<= x <= 179:
        k = 360 / x
        print(k)
    return k
def main():
    x = int(input())

    temp = 360 // x
    if 360 % x != 0:
        temp += 1
    print(temp)

if __name__ == '__main__':
    main()
x=int(input())
t=x
if(360%x==0):
    print(360//x)
else:
    count=0
    while(x!=360):
        x+=t
        if(x>360):
            x=x-360
            t=x
        count+=1
    print(count)
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    X = int(input())

    X = max(X, 180 - X)
    for n in range(3, 361):
        s = 180 * (n - 2)
        d, m = divmod(s, n)
        if not m and d == X:
            print(n)
            break


main()
X=int(input())

def rec(x):
    if 360%x==0:
        ans=360//x
    else:
        y=x*((360-1+x)//x)-360
        ans=(360-1+x)//x*rec(y)
    return ans

if X<=120:
    ans=rec(X)
else:
    a=360-2*X
    ans=360//a
print(ans)
x=int(input())
if(360%x==0):
    print(int(360/x))
def times(X):
    if X == int(X):
        if 1<= X <= 179:
            K = 360/X
            if int(K) < K :
                K = int(K) + 1
                print(K)
            else:
                print(int(K))
x = int(input())
import math

steps = 1
X = x

a,b = math.sin(3.14159*x/180),math.cos(3.14159*x/180)
while True:
    # print(x,a,b)
    x += X
    r = 3.14159*x/180
    a = a + math.sin(r)
    b = b + math.cos(r)
    steps+=1
    if a<10**-6 and b<10**-6:
        break
    
    
print(steps)
import math
x = int(input())
for i in range(1,361):
    if x*i >= 360:
        print(i)
        exit()
import math
X = int(input())

if 360 % X == 0:
	ans = 360 // X
else:
	ans = 360 // (180 - X)

print(ans)
x = int(input())
if 360 % x == 0:
    ans = 360 // x
else:
    ans = 360 // x * (x // (360 % x))
print(ans)
k = int(input())
if 0 <= k and k <= 179:
	num = int(360 / k)
	print(num)
# import matplotlib.pyplot as plt
import math

def squaredDistance(a, b):
  return (a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2

angle = 90
X = int(input())
iter = 0
current = [0, 0]
previous = current

while (iter == 0 or squaredDistance(current, [0, 0]) > 0.001):
  if (iter > 500):
    break

  dir = [math.cos(math.radians(angle)), math.sin(math.radians(angle))]
  current = [current[0] + dir[0], current[1] + dir[1]]
  angle = (angle + X) % 360
  # plt.plot([previous[0], current[0]], [previous[1], current[1]])
  previous = current
  iter = iter + 1

# plt.show()

print(iter)
import sys
import math

X = int(sys.stdin.readline())
# a = 360 * n // X
gcd = math.gcd(360, X)
print((360 // gcd) * (X // gcd))
import math
X = int(input())

if 360 % X == 0:
	ans = 360 // X
else:
	ans = (360 * X) // math.gcd(360, X)

print(ans)
x = int(input())
t = 0
while True:
    if 360 % x == 0:
        res = int(360 / x)
        t += res
        break
    else:
        for i in range(2, 362):
            if i * x > 360:
                x = i * x - 360
                t += i
                break
print(t)
import sys
import math
input = sys.stdin.readline

def inp():
    return(int(input()))

x = inp()
if x>180:
    print(360//(360-x))
else: print(360//x)
x=float(input())
actions=float(360/x)
print(int(actions))
import math
y = int(input())
print(y*360//math.gcd(y,360))
n = int(input())

if 360 % n == 0:
    print(360 // n)
else:
    print(360 // n + 1)
n=int(input())
if(360%n==0):
  print(360//n)
else:
  print("0")
import math
x=int(input())
if 360%x==0:
  print(360//x)
else:
  k=0
  xt=x
  p=[0,1]
  for i in range(1,1000):
    xt+=x
    rad=xt/180*math.pi
    p[0]+=-math.sin(rad)
    p[1]+=math.cos(rad)
    if math.isclose(p[0], 0, abs_tol=1e-10) and math.isclose(p[1], 0, abs_tol=1e-10):
      break
  if i==999:
    print(0)
  else:
    print(i)
n=int(input())
for i in range(1,361):
  if n**i%360==0:
    print(i)
import math

theta = int(input())

if theta > 90:
    theta = abs(theta-180)
    print(theta)

if 360%theta == 0:
    print(360//theta)

else:
    gcdiv = math.gcd(theta,360)
    kotae = ((360//gcdiv) * (theta//gcdiv))
    print(kotae)
x = int(input())
y = 180-x
z = 360
while(z%y!=0):
  z += 360
print(z//y)
def times(X):
    if 1< X < 179:
        if X is int:
            K = 360/X
            print(K)
            return K
        else:
            print('please input integer')
    else:
        print("please input an integer.")

times(90)
X = int(input())
if 360%X==0:
    print(int(360/X))
else:
    print(int(360*X))
import math
X = int(input())

ans = (X * 360) // math.gcd(X, 360)
print(ans)
X = int(input())
if 360 % X == 0:
  print(360 // X)
else:
  print(360 // X + 1)
import math
a=int(input())
ans=360/a
print(math.ceil(ans))
x=input("")
s = x.split(".")
if eval(x)>=1 and eval(x)<=179 and len(s) == 1 and 360%eval(x) == 0:
    print(int(360/eval(x)))
if eval(x)>=1 and eval(x)<=179 and len(s) == 1 and 360%eval(x) != 0:
    print(int(360 / eval(x))+1)
a=int(input())
if 360%a==0:
    print(360//a)
else:
    print(360//(360%a))
x=int(input())
a=360/(180-x)
if(int(a)==a):
  print(int(a))
else:
  a=360/x
  print(int(a))
a=int(input())
for i in range(1,361):
  if a*i==360:
    print(str(int(i)))
    break
  else:
    for j in range(1,361):
     if a*i/j==360:
      print(str(int(j*i)))
      break
     else:
       pass
n=int(input())
l=360//n
if id(l) == float:
 	print(l+1)
else:
	print(l)
X = int(input())
if 1 <= X <= 179:
  print(int(360/X))
n=int(input())
if(360%n==0):
  print(360//n)
else:
  print((360//n)+1)
X = int(input())
if 1 <= X <= 179:
    K = 360 / X
    if int(K) == K:
        print(K)
    else:
        K = int(K)
        print(K)
x = int(input())
if 360 % x == 0:
    ans = 360 // x
else:
    ans = 360 // x + 1
print(ans)
x = int(input())
k = 360 / x
if k.is_integer():
  print(int(k))
else:
  for idx in range(2, x+1):
    tmp = k * idx
    if tmp.is_integer():
      print(tmp)
      break
import sys
input = sys.stdin.readline
ins = lambda: input().rstrip()
ini = lambda: int(input().rstrip())
inm = lambda: map(int, input().split())
inl = lambda: list(map(int, input().split()))

n = ini()
print(360 // n)
import sys
import math
def input(): return sys.stdin.readline().rstrip()
def main():
    x = math.radians(int(input()))
    cur_x, cur_y = 0, 1
    cur_dig = math.pi/2
    ans = 1
    while cur_x**2+cur_y**2>0.1:
        cur_dig += x 
        cur_x += math.cos(cur_dig)
        cur_y += math.sin(cur_dig) 
        ans += 1
    print(ans)

if __name__=='__main__':
    main()
x = int(input())
k = 1
d = 180 - x
while d % 360 != 0:
  k += 1
  d += 180 - x
print(k)
import sys
x=int(input())

for j in range(1,361):
    for k in range(1,361):
        if 360*k==x*j:
            print(x,j,k)
            sys.exit()
import numpy as np
X = int(input())
a = 0
b = 0

for i in range(1,360): 
	a += np.sin(X * i)
	b += np.cos(X * i)
	if a == 0 and b == 0: 
		print(i)
import math 
X = int(input())
lcm = round(360 * X / math.gcd(360, X))
print(lcm)
K = round(lcm / X)
print(K)
X = int(input()) 
if X >= 90:
  print(int(360/X))
else:
  print(int(720/X))
def lcm(x, y):
   if x > y:
       greater = x
   else:
       greater = y
 
   while(True):
       if((greater % x == 0) and (greater % y == 0)):
           lcm = greater
           break
       greater += 1
 
   return lcm
 
 

num1 = int(input())
a=lcm(num1,360)
b=a/360
print(b)
k = int(input())
if 0 <= k <= 179:
	num = int(360 / k)
	print(num)
x=int(input())
var=360//x
if 360%x!=0:
  print(var+1)
else:
  print(var)
x = int(input())
n = 0
while (x*n)%360!=0:
    n+=1
print(n)