from fractions import gcd

n = int(input())
aa = tuple(map(int, input().split()))

a = aa[0]
for b in aa[1:]:
    a = gcd(a, b)
print(a) from fractions import gcd n = int(input()) n int(input()) int input() input aa = tuple(map(int, input().split())) aa tuple(map(int, input().split())) tuple map(int, input().split()) map int input().split() ().split () input split a = aa[0] a aa[0] aa 0 for b in aa[1:]:
    a = gcd(a, b) b aa[1:] aa 1: 1 a = gcd(a, b) a gcd(a, b) gcd a b print(a) print a a = gcd(a, b) gcd(a, b) a a = aa[0] aa[0] a aa = tuple(map(int, input().split())) tuple(map(int, input().split())) aa n = int(input()) int(input()) n
from fractions import gcd

n = int(input())
aa = tuple(map(int, input().split()))

a = aa[0]
for b in aa[1:]:
    a = gcd(a, b)
print(a)
