import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines



from fractions import gcd

from functools import reduce



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



MOD = 10 ** 9 + 7



lcm = reduce(lambda x,y: y//gcd(x,y)*x, A)

lcm %= MOD



coef = sum(pow(x, MOD-2, MOD) for x in A)

answer = lcm * coef % MOD



print(answer)
import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines



import numpy as np



N = int(readline())

A = np.array(read().split(),np.int64)



MOD = 10 ** 9 + 7



U = 10 ** 6 + 10

is_prime = np.zeros(U, np.bool)

is_prime[2] = 1

is_prime[3::2] = 1

for p in range(3,U,2):

    if p*p > U:

        break

    if is_prime[p]:

        is_prime[p*p::p+p] = 0



M = 10 ** 3

small_primes = np.where(is_prime[:M])[0].tolist()



B = A.copy()

lcm = 1

for p in small_primes:

    e = 0

    while np.any(A % p == 0):

        e += 1

        A[A % p ==0] //= p

    lcm *= p**e

    lcm %= MOD



for x in set(A.tolist()):

    lcm *= x

    lcm %= MOD



answer = sum(pow(x, MOD-2, MOD) for x in B.tolist()) % MOD

answer *= lcm

answer %= MOD

print(answer)

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
from fractions import gcd
from functools import reduce

N, *A = list(map(int, read().split()))
MOD = 10**9 + 7
lcm = reduce(lambda x, y: y // gcd(x, y) * x, A)
lcm %= MOD
coef = sum(pow(x, MOD - 2, MOD) for x in A)
answer = lcm * coef % MOD
print(answer)

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
import numpy as np

N = int(readline())
A = np.array(read().split(), np.int64)
MOD = 10**9 + 7
U = 10**6 + 10
is_prime = np.zeros(U, np.bool)
is_prime[2] = 1
is_prime[3::2] = 1
for p in range(3, U, 2):
    if p * p > U:
        break
    if is_prime[p]:
        is_prime[p * p :: p + p] = 0
M = 10**3
small_primes = np.where(is_prime[:M])[0].tolist()
B = A.copy()
lcm = 1
for p in small_primes:
    e = 0
    while np.any(A % p == 0):
        e += 1
        A[A % p == 0] //= p
    lcm *= p**e
    lcm %= MOD
for x in set(A.tolist()):
    lcm *= x
    lcm %= MOD
answer = sum(pow(x, MOD - 2, MOD) for x in B.tolist()) % MOD
answer *= lcm
answer %= MOD
print(answer)

-from fractions import gcd -from functools import reduce +import numpy as np -N, *A = list(map(int, read().split())) +N = int(readline()) +A = np.array(read().split(), np.int64) -lcm = reduce(lambda x, y: y // gcd(x, y) * x, A) -lcm %= MOD -coef = sum(pow(x, MOD - 2, MOD) for x in A) -answer = lcm * coef % MOD +U = 10**6 + 10 +is_prime = np.zeros(U, np.bool) +is_prime[2] = 1 +is_prime[3::2] = 1 +for p in range(3, U, 2): +    if p * p > U: +        break +    if is_prime[p]: +        is_prime[p * p :: p + p] = 0 +M = 10**3 +small_primes = np.where(is_prime[:M])[0].tolist() +B = A.copy() +lcm = 1 +for p in small_primes: +    e = 0 +    while np.any(A % p == 0): +        e += 1 +        A[A % p == 0] //= p +    lcm *= p**e +    lcm %= MOD +for x in set(A.tolist()): +    lcm *= x +    lcm %= MOD +answer = sum(pow(x, MOD - 2, MOD) for x in B.tolist()) % MOD +answer *= lcm +answer %= MOD