from fractions import gcd
from functools import reduce


input()
A = map(int, input().split())
print(reduce(gcd, A)) from fractions import gcd from functools import reduce input() input A = map(int, input().split()) A map(int, input().split()) map int input().split() ().split () input split print(reduce(gcd, A)) print reduce(gcd, A) reduce gcd A A = map(int, input().split()) map(int, input().split()) A
from fractions import gcd
from functools import reduce


input()
A = map(int, input().split())
print(reduce(gcd, A))
