eolymp
bolt
Try our new interface for solving problems
Problems

Peter and the number

Peter and the number

Time limit 1 second
Memory limit 64 MiB

Written on the blackboard N of natural numbers. Peter chooses two random of them and if they are identical, one of them washes, but if they are different, write their difference rather than a larger one. In the end, the board remains one number. What numbers could get Pete after all deletions?

Input data

The first line contains an integer N (N10^5). he second line contains N integers, separated by a space. All numbers in the input file is guaranteed to fit the type Longint.

Output data

All of the possible numbers that can get Peter, with a space.

Examples

Input example #1
4
1 2 3 3
Output example #1
1