import math
from functools import reduce

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

n = input()
l = [ int(x) for x in input().split() ]

print(gcd_list(l)) import math math from functools import reduce def gcd_list(numbers):
    return reduce(math.gcd, numbers) gcd_list return reduce(math.gcd, numbers) reduce(math.gcd, numbers) reduce math.gcd math gcd numbers numbers numbers n = input() n input() input int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x l = [ int(x) for x in input().split() ] l [ int(x) for x in input().split() ] print(gcd_list(l)) print gcd_list(l) gcd_list l def gcd_list(numbers):
    return reduce(math.gcd, numbers) def gcd_list(numbers):
    return reduce(math.gcd, numbers) gcd_list l = [ int(x) for x in input().split() ] [ int(x) for x in input().split() ] l n = input() input() n
import math
from functools import reduce

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

n = input()
l = [ int(x) for x in input().split() ]

print(gcd_list(l))
