n=gets.to_i a=[] while cin=gets a+=[cin.to_i] end p a.inject(100){|s,r| s.gcd(r)}