n=int(input())
A=[]*n
A[:]=map(int,input().split())

def gcd(a,b):
    while b:
        a,b=b,a%b
    return a

ans=0
for i in range(n):
  ans=gcd(ans,A[i])
print(ans) n=int(input()) n int(input()) int input() input A=[]*n A []*n [] n A[:]=map(int,input().split()) A[:] A : map(int,input().split()) map int input().split() ().split () input split def gcd(a,b):
    while b:
        a,b=b,a%b
    return a gcd while b:
        a,b=b,a%b
     b a,b=b,a%b a b b a%b a b return a a a a b b ans=0 ans 0 for i in range(n):
  ans=gcd(ans,A[i]) i range(n) range n ans=gcd(ans,A[i]) ans gcd(ans,A[i]) gcd ans A[i] A i print(ans) print ans n=int(input()) int(input()) n ans=gcd(ans,A[i]) gcd(ans,A[i]) ans ans=0 0 ans def gcd(a,b):
    while b:
        a,b=b,a%b
    return a def gcd(a,b):
    while b:
        a,b=b,a%b
    return a gcd A=[]*n []*n A
n=int(input())
A=[]*n
A[:]=map(int,input().split())

def gcd(a,b):
    while b:
        a,b=b,a%b
    return a

ans=0
for i in range(n):
  ans=gcd(ans,A[i])
print(ans)