
n=int(input())
a_=list(map(int,input().split()))

def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
  
m=a_[0]
for i in range(n):
  m=gcd(m,a_[i])
  
print(m) n=int(input()) n int(input()) int input() input a_=list(map(int,input().split())) a_ list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
   gcd while b:
		a, b = b, a % b
	 b a, b = b, a % b a b b a % b a b return a a a a b b m=a_[0] m a_[0] a_ 0 for i in range(n):
  m=gcd(m,a_[i])
   i range(n) range n m=gcd(m,a_[i]) m gcd(m,a_[i]) gcd m a_[i] a_ i print(m) print m m=a_[0] a_[0] m n=int(input()) int(input()) n def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
   def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
   gcd a_=list(map(int,input().split())) list(map(int,input().split())) a_ m=gcd(m,a_[i]) gcd(m,a_[i]) m

n=int(input())
a_=list(map(int,input().split()))

def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
  
m=a_[0]
for i in range(n):
  m=gcd(m,a_[i])
  
print(m)
