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