from fractions import gcd

from functools import reduce



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

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



mod = 10 ** 9 + 7



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



L = 1

for a in A:

    L *= a // gcd(L, a)



print((sum(L // a for a in A) % mod))
from fractions import gcd
from functools import reduce

lcm = lambda a, b: a * b // gcd(a, b)
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

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

-from functools import reduce -lcm = lambda a, b: a * b // gcd(a, b) -L = reduce(lcm, A) +L = 1 +for a in A: +    L *= a // gcd(L, a)