from fractions import gcd

from functools import reduce



lcm = lambda a, b: b // gcd(a, b) * a

mod = 10 ** 9 + 7



N, *A = list(map(int, open(0).read().split()))



L = reduce(lcm, A)

print((sum(L // a for a in A) % mod))

from fractions import gcd

from functools import reduce



lcm = lambda a, b: b // gcd(a, b) * a

mod = 10 ** 9 + 7



N, *A = list(map(int, open(0).read().split()))



L = reduce(lcm, A) % mod

print((sum(L * pow(a, mod - 2, mod) % mod for a in A) % mod))
from fractions import gcd
from functools import reduce

lcm = lambda a, b: b // gcd(a, b) * a
mod = 10**9 + 7
N, *A = list(map(int, open(0).read().split()))
L = reduce(lcm, A)
print((sum(L // a for a in A) % mod))

from fractions import gcd
from functools import reduce

lcm = lambda a, b: b // gcd(a, b) * a
mod = 10**9 + 7
N, *A = list(map(int, open(0).read().split()))
L = reduce(lcm, A) % mod
print((sum(L * pow(a, mod - 2, mod) % mod for a in A) % mod))

-L = reduce(lcm, A) -print((sum(L // a for a in A) % mod)) +L = reduce(lcm, A) % mod +print((sum(L * pow(a, mod - 2, mod) % mod for a in A) % mod))