from math import gcd

n = int(input())
a = list(map(int, input().split()))
g = 0
for x in a:
    g = gcd(g, x)
print(g) from math import gcd 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 g = 0 g 0 for x in a:
    g = gcd(g, x) x a g = gcd(g, x) g gcd(g, x) gcd g x print(g) print g n = int(input()) int(input()) n a = list(map(int, input().split())) list(map(int, input().split())) a g = gcd(g, x) gcd(g, x) g g = 0 0 g
from math import gcd

n = int(input())
a = list(map(int, input().split()))
g = 0
for x in a:
    g = gcd(g, x)
print(g)
