output_description: Print the number of times Takahashi will do the action before he is at the
  starting position again.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      X
attempt: # -*- coding: utf-8 -*-
  import math
  import sys
  
  # sys.setrecursionlimit(10**6)
  # buff_readline = sys.stdin.buffer.readline
  buff_readline = sys.stdin.readline
  readline = sys.stdin.readline
  
  INF = 2**62 - 1
  
  
  def read_int():
      return int(buff_readline())
  
  
  def read_int_n():
      return list(map(int, buff_readline().split()))
  
  
  def read_float():
      return float(buff_readline())
  
  
  def read_float_n():
      return list(map(float, buff_readline().split()))
  
  
  def read_str():
      return readline().strip()
  
  
  def read_str_n():
      return readline().strip().split()
  
  
  def error_print(*args):
      print(*args, file=sys.stderr)
  
  
  def mt(f):
      import time
  
      def wrap(*args, **kwargs):
          s = time.time()
          ret = f(*args, **kwargs)
          e = time.time()
  
          error_print(e - s, "sec")
          return ret
  
      return wrap
  
  
  @mt
  def slv(X):
      d = [1, 0]
      c = [0, 0]
      eps = 10**-7
      X /= 360
      X *= 2 * math.pi
      for i in range(1, 361):
          c[0] += d[0]
          c[1] += d[1]
          d = [
              d[0] * math.cos(X) - d[1] * math.sin(X),
              d[0] * math.sin(X) + d[1] * math.cos(X),
          ]
  
          if abs(c[0]) < eps and abs(c[1]) < eps:
              return i
      return i
  
  
  def main():
      X = read_int()
      print(slv(X))
  
  
  if __name__ == "__main__":
      main()
  
problem_description: Statement
  
  Takahashi is standing on a two-dimensional plane, facing north. Find the
  minimum positive integer K such that Takahashi will be at the starting
  position again after he does the following action K times:
  
    * Go one meter in the direction he is facing. Then, turn X degrees counter-clockwise.
samples: [{"input": "90", "output": "4\n    \n\nTakahashi's path is a square.\n\n* * *"}, {"input": "1", "output": "360"}]