Competitions

# October 9 - BMTK Programming School, High League

# GCD

Find the Greatest Common Divisor of **n** numbers.

#### Input

The first line contains the value of **n** (**1** < **n** < **101**). The second line contains **n** positive integers, separated with a space. Each number is not greater than **30000**.

#### Output

The Greatest Common Divisor of **n** numbers.

Input example #1

2 15 25

Output example #1

5