#逆元しない場合



from fractions import gcd



n=int(eval(input()))



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

mod=10**9+7









L=a[0]

def lcm(x,y):

    return x//gcd(x,y)*y



for i in a:

    L=lcm(L,i)





print((sum([L//i for i in a])%mod))
#逆元



from fractions import gcd



n=int(eval(input()))



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

mod=10**9+7



b=0

for i in a:

    b+=pow(i,mod-2,mod)





L=a[0]

def lcm(x,y):

    return x//gcd(x,y)*y



for i in a:

    L=lcm(L,i)





print((L*b%mod))
# 逆元しない場合
from fractions import gcd

n = int(eval(input()))
a = list(map(int, input().split()))
mod = 10**9 + 7
L = a[0]


def lcm(x, y):
    return x // gcd(x, y) * y


for i in a:
    L = lcm(L, i)
print((sum([L // i for i in a]) % mod))

# 逆元
from fractions import gcd

n = int(eval(input()))
a = list(map(int, input().split()))
mod = 10**9 + 7
b = 0
for i in a:
    b += pow(i, mod - 2, mod)
L = a[0]


def lcm(x, y):
    return x // gcd(x, y) * y


for i in a:
    L = lcm(L, i)
print((L * b % mod))

-# 逆元しない場合 +# 逆元 +b = 0 +for i in a: +    b += pow(i, mod - 2, mod) -print((sum([L // i for i in a]) % mod)) +print((L * b % mod))