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