import math
from functools import reduce
_=input()
print(reduce(math.gcd,map(int,input().split()))) import math math from functools import reduce _=input() _ input() input print(reduce(math.gcd,map(int,input().split()))) print reduce(math.gcd,map(int,input().split())) reduce math.gcd math gcd map(int,input().split()) map int input().split() ().split () input split _=input() input() _
import math
from functools import reduce
_=input()
print(reduce(math.gcd,map(int,input().split())))