The greatest common divisor#426

The greatest common divisor

1 second
128 megabytes
Very easy (≈850)

positive integers are given. Find the greatest common divisor of these numbers.

Input

The first line contains one integer n~(n \le 1000). The second line contains positive integers, each does not exceed 2 \cdot 10^9.

Output

Print the greatest common divisor of given numbers.

Examples

Example 1

Loading
Loading