#!/usr/bin/python3
from fractions import gcd
from functools import reduce
gcdx = lambda arr: reduce(gcd, arr)

n = int(input())
arr = [int(input()) for _ in range(n)]
g = gcdx(arr)
res = sum(e//g for e in arr)
print(res)