from fractions import gcd


input()
A = map(int, input().split())
ans = next(A)
for a in A:
    ans = gcd(ans, a)
print(ans) from fractions import gcd input() input A = map(int, input().split()) A map(int, input().split()) map int input().split() ().split () input split ans = next(A) ans next(A) next A for a in A:
    ans = gcd(ans, a) a A ans = gcd(ans, a) ans gcd(ans, a) gcd ans a print(ans) print ans ans = next(A) next(A) ans ans = gcd(ans, a) gcd(ans, a) ans A = map(int, input().split()) map(int, input().split()) A
from fractions import gcd


input()
A = map(int, input().split())
ans = next(A)
for a in A:
    ans = gcd(ans, a)
print(ans)
