N = int(input())
A = list(map(int,input().split()))

import math

def gcd_list(nums):
  gcd = nums[0]
  for i in range(1,len(nums)):
    gcd = math.gcd(gcd,nums[i])
  return gcd

print(gcd_list(A)) N = int(input()) N int(input()) int input() input A = list(map(int,input().split())) A list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split import math math def gcd_list(nums):
  gcd = nums[0]
  for i in range(1,len(nums)):
    gcd = math.gcd(gcd,nums[i])
  return gcd gcd_list gcd = nums[0] gcd nums[0] nums 0 for i in range(1,len(nums)):
    gcd = math.gcd(gcd,nums[i])
   i range(1,len(nums)) range 1 len(nums) len nums gcd = math.gcd(gcd,nums[i]) gcd math.gcd(gcd,nums[i]) math.gcd math gcd gcd nums[i] nums i return gcd gcd nums nums print(gcd_list(A)) print gcd_list(A) gcd_list A def gcd_list(nums):
  gcd = nums[0]
  for i in range(1,len(nums)):
    gcd = math.gcd(gcd,nums[i])
  return gcd def gcd_list(nums):
  gcd = nums[0]
  for i in range(1,len(nums)):
    gcd = math.gcd(gcd,nums[i])
  return gcd gcd_list A = list(map(int,input().split())) list(map(int,input().split())) A N = int(input()) int(input()) N
N = int(input())
A = list(map(int,input().split()))

import math

def gcd_list(nums):
  gcd = nums[0]
  for i in range(1,len(nums)):
    gcd = math.gcd(gcd,nums[i])
  return gcd

print(gcd_list(A))