import math from functools import reduce n = int(input()) a = list(map(int, input().split())) g = reduce(math.gcd, a) print(sum(x // g for x in a))