from math import gcd
from functools import reduce

N = int(input())
A = [int(i) for i in input().split()]

def gcd_list(numbers):
    return reduce(gcd, numbers)

g = gcd_list(A)
print(g) from math import gcd from functools import reduce N = int(input()) N int(input()) int input() input int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i A = [int(i) for i in input().split()] A [int(i) for i in input().split()] def gcd_list(numbers):
    return reduce(gcd, numbers) gcd_list return reduce(gcd, numbers) reduce(gcd, numbers) reduce gcd numbers numbers numbers g = gcd_list(A) g gcd_list(A) gcd_list A print(g) print g def gcd_list(numbers):
    return reduce(gcd, numbers) def gcd_list(numbers):
    return reduce(gcd, numbers) gcd_list N = int(input()) int(input()) N A = [int(i) for i in input().split()] [int(i) for i in input().split()] A g = gcd_list(A) gcd_list(A) g
from math import gcd
from functools import reduce

N = int(input())
A = [int(i) for i in input().split()]

def gcd_list(numbers):
    return reduce(gcd, numbers)

g = gcd_list(A)
print(g)