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

rem=-1
while True:
    a=sorted(a)
    if a[0]==rem:
        print(a[0])
        break
    rem=a[0]
    for i in range(1,n):
        a[i]%=rem
        if a[i]==0:
            a[i]+=rem 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 rem=-1 rem -1 while True:
    a=sorted(a)
    if a[0]==rem:
        print(a[0])
        break
    rem=a[0]
    for i in range(1,n):
        a[i]%=rem
        if a[i]==0:
            a[i]+=rem True a=sorted(a) a sorted(a) sorted a if a[0]==rem:
        print(a[0])
        break
     a[0]==rem a[0] a 0 rem print(a[0]) print a[0] a 0 break rem=a[0] rem a[0] a 0 for i in range(1,n):
        a[i]%=rem
        if a[i]==0:
            a[i]+=rem i range(1,n) range 1 n a[i]%=rem a[i] a i rem if a[i]==0:
            a[i]+=rem a[i]==0 a[i] a i 0 a[i]+=rem a[i] a i rem a=list(map(int,input().split())) list(map(int,input().split())) a n=int(input()) int(input()) n a=sorted(a) sorted(a) a rem=a[0] a[0] rem rem=-1 -1 rem
n=int(input())
a=list(map(int,input().split()))

rem=-1
while True:
    a=sorted(a)
    if a[0]==rem:
        print(a[0])
        break
    rem=a[0]
    for i in range(1,n):
        a[i]%=rem
        if a[i]==0:
            a[i]+=rem