import sys

input = sys.stdin.readline



from fractions import gcd





def lcm(a, b):

    return a * b // gcd(a, b)





def mod_inv(a, m):

    return pow(a, m-2, m)





MOD = 10 ** 9 + 7

N = int(eval(input()))

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



LCM = 1

for a in A:

    LCM = lcm(LCM, a)



# ans = LCM * sum([mod_inv(a, MOD) for a in A]) % MOD

ans = 0

for a in A:

    ans += LCM * mod_inv(a, MOD) % MOD

    ans %= MOD



print(ans)

from fractions import gcd





def lcm(a, b):

    return a * b // gcd(a, b)





def mod_inv(a, m):

    return pow(a, m-2, m)





MOD = 10 ** 9 + 7

N = int(eval(input()))

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



LCM = 1

for a in A:

    LCM = lcm(LCM, a)

LCM %= MOD



# ans = LCM * sum([mod_inv(a, MOD) for a in A]) % MOD

ans = 0



for a in A:

    ans += LCM * mod_inv(a, MOD) % MOD

    ans %= MOD



print(ans)

import sys

input = sys.stdin.readline
from fractions import gcd


def lcm(a, b):
    return a * b // gcd(a, b)


def mod_inv(a, m):
    return pow(a, m - 2, m)


MOD = 10**9 + 7
N = int(eval(input()))
A = list(map(int, input().split()))
LCM = 1
for a in A:
    LCM = lcm(LCM, a)
# ans = LCM * sum([mod_inv(a, MOD) for a in A]) % MOD
ans = 0
for a in A:
    ans += LCM * mod_inv(a, MOD) % MOD
    ans %= MOD
print(ans)

from fractions import gcd


def lcm(a, b):
    return a * b // gcd(a, b)


def mod_inv(a, m):
    return pow(a, m - 2, m)


MOD = 10**9 + 7
N = int(eval(input()))
A = list(map(int, input().split()))
LCM = 1
for a in A:
    LCM = lcm(LCM, a)
LCM %= MOD
# ans = LCM * sum([mod_inv(a, MOD) for a in A]) % MOD
ans = 0
for a in A:
    ans += LCM * mod_inv(a, MOD) % MOD
    ans %= MOD
print(ans)

-import sys - -input = sys.stdin.readline +LCM %= MOD