Compute the greatest common divisor (GCD) of all n positive integers in the array. The GCD of a list is the largest positive integer that divides every element.
Input format
Line 1: an integer n.
Line 2: n space-separated positive integers.
Output format
One line: the GCD of all elements.
Constraints
- 1 <= n <= 100000
- 1 <= each value <= 1000000000