from math import gcd

N = int(input())
A = list(map(int, input().split()))
min_ = 0
gcd_ = A[0]
for i in range(1, N):
    gcd_ = gcd(A[i], gcd_)
print(gcd_) from math import gcd 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 min_ = 0 min_ 0 gcd_ = A[0] gcd_ A[0] A 0 for i in range(1, N):
    gcd_ = gcd(A[i], gcd_) i range(1, N) range 1 N gcd_ = gcd(A[i], gcd_) gcd_ gcd(A[i], gcd_) gcd A[i] A i gcd_ print(gcd_) print gcd_ min_ = 0 0 min_ N = int(input()) int(input()) N A = list(map(int, input().split())) list(map(int, input().split())) A gcd_ = gcd(A[i], gcd_) gcd(A[i], gcd_) gcd_ gcd_ = A[0] A[0] gcd_
from math import gcd

N = int(input())
A = list(map(int, input().split()))
min_ = 0
gcd_ = A[0]
for i in range(1, N):
    gcd_ = gcd(A[i], gcd_)
print(gcd_)