output_description: Print the minimum possible final health of the last monster alive.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
      A_1 A_2 ... A_N
attempt: N = int(input())
  L = [int(i) for i in input().split()]
  l = sorted(L)
  # print(l)
  while len(l) > 1:
      for i in range(1, len(l)):
          l[i] = l[i] % l[0]
      while 0 in l:
          l.remove(0)
      l.sort()
  print(l[0])
  
problem_description: Statement
  
  There are N monsters, numbered 1, 2, ..., N.
  
  Initially, the health of Monster i is A_i.
  
  Below, a monster with at least 1 health is called alive.
  
  Until there is only one alive monster, the following is repeated:
  
    * A random alive monster attacks another random alive monster.
    * As a result, the health of the monster attacked is reduced by the amount equal to the current health of the monster attacking.
  
  Find the minimum possible final health of the last monster alive.
samples: [{"input": "4\n    2 10 8 40", "output": "2\n    \n\nWhen only the first monster keeps on attacking, the final health of the last\nmonster will be 2, which is minimum.\n\n* * *"}, {"input": "4\n    5 13 8 1000000000", "output": "1\n    \n\n* * *"}, {"input": "3\n    1000000000 1000000000 1000000000", "output": "1000000000"}]