from fractions import gcd n = input() A = [] for i in xrange(n): x = input() A.append(x) ans = 0 x = reduce(gcd, A) for a in A: ans += a / x print ans