BUET19B - GCD

no tags 

In this problem you need to find the G.C.D. of some numbers.

Since G.C.D. between two numbers is too mainstream you need to find the G.C.D. of all the given numbers.

Input

In the first line, there will be an integer, N (1 ≤ N ≤ 105).

In the next line there will be N integers. All the given integers will be less than 105.

Output

You have to print the G.C.D. of all the given numbers.

Example

Input:
5
2 4 6 8 2

Output:
2


Added by:Anik
Date:2019-01-31
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:C++ 4.3.2