from fractions import gcd
n = int(input())
monster = list(map(int, input().split()))
a=gcd(monster[0],monster[1])
for i in range(2,n):
    a=gcd(a,monster[i])
print(a) from fractions import gcd n = int(input()) n int(input()) int input() input monster = list(map(int, input().split())) monster list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split a=gcd(monster[0],monster[1]) a gcd(monster[0],monster[1]) gcd monster[0] monster 0 monster[1] monster 1 for i in range(2,n):
    a=gcd(a,monster[i]) i range(2,n) range 2 n a=gcd(a,monster[i]) a gcd(a,monster[i]) gcd a monster[i] monster i print(a) print a monster = list(map(int, input().split())) list(map(int, input().split())) monster n = int(input()) int(input()) n a=gcd(monster[0],monster[1]) gcd(monster[0],monster[1]) a a=gcd(a,monster[i]) gcd(a,monster[i]) a
from fractions import gcd
n = int(input())
monster = list(map(int, input().split()))
a=gcd(monster[0],monster[1])
for i in range(2,n):
    a=gcd(a,monster[i])
print(a)