Yo`nalishlar
Hozirda online

Statistika

Masalalar soni: 909

Foydalanuvchilar soni: 8819

Jo'natishlar soni: 714352

Muhokama yozuvlari: 4541

Yangiliklar soni: 97

Yangiliklar izohlari: 1174


So'ngi izohlar

717. GCD
Vaqt limiti: 1 sekund
Xotira limiti: 64 MB

   Find the Greatest Common Divisor of n numbers.

Input

   The first line contains the value of n (1 < n < 1001). The second line contains n positive integers, separated with a space. Each number is not greater than 1000000000.

   Output

   The Greatest Common Divisor of n numbers.

Samples

Input

Output

1

2

15 25

5

 

Tayyorladi: Azat Yusupov
Text from: e-olimp.com
Mening urinishlarim(0) Muhokama (2) Jo'natish Eng yaxshi yechimlar Barcha muvaffaqiyatli urinishlar(141) Barcha urinishlar(181)