Calculate the greatest common divisor of multiple positive integers.
Definition of greatest common divisor: if d is a common divisor of a set of positive integer S, then for all element i in S, d|i. The greatest common divisor is the largest d satisfy the above condition.
Input consists of 2 lines.
The first line contains a integer N, representing the # of positive integers.
The second line contains N positive integers. Numbers are seperated by a space.
It is guaranteed that
Print out the greatest common divisor of these positive integers.