from fractions import gcd
from functools import reduce
N = input()

List = list(map(int, input().split()))

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

List = list(map(int, input().split()))

print(reduce(gcd, List))
