n=int(input()) a=[int(input()) for i in range(n)] import math print(sum(a)//math.gcd(*a))