n = int(input())
a = list(map(int, input().split()))
while len(a) > 1:
  m = min(a)
  a = [a[i]%m for i in range(len(a)) if a[i]%m > 0]
  a.append(m)
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 while len(a) > 1:
  m = min(a)
  a = [a[i]%m for i in range(len(a)) if a[i]%m > 0]
  a.append(m) len(a) > 1 len(a) len a 1 m = min(a) m min(a) min a a[i]%m for i in range(len(a)) if a[i]%m > 0 for i in range(len(a)) if a[i]%m > 0 i range(len(a)) range len(a) len a a[i]%m > 0 a[i]%m a[i] a i m 0 if a[i]%m > 0 a[i]%m a[i] a i m a = [a[i]%m for i in range(len(a)) if a[i]%m > 0] a [a[i]%m for i in range(len(a)) if a[i]%m > 0] a.append(m) a.append a append m print(m) print m a = [a[i]%m for i in range(len(a)) if a[i]%m > 0] [a[i]%m for i in range(len(a)) if a[i]%m > 0] a a = list(map(int, input().split())) list(map(int, input().split())) a m = min(a) min(a) m n = int(input()) int(input()) n
n = int(input())
a = list(map(int, input().split()))
while len(a) > 1:
  m = min(a)
  a = [a[i]%m for i in range(len(a)) if a[i]%m > 0]
  a.append(m)
print(m)
