from fractions import gcd



N = int(eval(input()))

A = list(map(int,input().split()))

lcm = 1

for i in A:

    lcm = (lcm*i)//gcd(lcm,i)

ans = 0

for i in A:

    ans += lcm//i

print((ans%(10**9+7)))

def gcd(x,y):

    if y==0:

        return x

    return gcd(y,x%y)



MOD = 10**9+7

N = int(eval(input()))

A = list(map(int,input().split()))

lcm = 1

for i in A:

    lcm = (lcm*i)//gcd(lcm,i)

lcm %= MOD

ans = 0

for i in A:

    ans += lcm*pow(i,MOD-2,MOD)



print((ans%MOD))

from fractions import gcd

N = int(eval(input()))
A = list(map(int, input().split()))
lcm = 1
for i in A:
    lcm = (lcm * i) // gcd(lcm, i)
ans = 0
for i in A:
    ans += lcm // i
print((ans % (10**9 + 7)))

def gcd(x, y):
    if y == 0:
        return x
    return gcd(y, x % y)


MOD = 10**9 + 7
N = int(eval(input()))
A = list(map(int, input().split()))
lcm = 1
for i in A:
    lcm = (lcm * i) // gcd(lcm, i)
lcm %= MOD
ans = 0
for i in A:
    ans += lcm * pow(i, MOD - 2, MOD)
print((ans % MOD))

-from fractions import gcd +def gcd(x, y): +    if y == 0: +        return x +    return gcd(y, x % y) + +MOD = 10**9 + 7 +lcm %= MOD -    ans += lcm // i -print((ans % (10**9 + 7))) +    ans += lcm * pow(i, MOD - 2, MOD) +print((ans % MOD))