import numpy as np

n = int(input())
a = list(map(int,input().split()))

gcd = np.frompyfunc(np.gcd,2,1)

print(gcd.reduce(a)) import numpy as np numpy 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 gcd = np.frompyfunc(np.gcd,2,1) gcd np.frompyfunc(np.gcd,2,1) np.frompyfunc np frompyfunc np.gcd np gcd 2 1 print(gcd.reduce(a)) print gcd.reduce(a) gcd.reduce gcd reduce a gcd = np.frompyfunc(np.gcd,2,1) np.frompyfunc(np.gcd,2,1) gcd a = list(map(int,input().split())) list(map(int,input().split())) a n = int(input()) int(input()) n
import numpy as np

n = int(input())
a = list(map(int,input().split()))

gcd = np.frompyfunc(np.gcd,2,1)

print(gcd.reduce(a))