from fractions import gcd





def lcm(x, y):

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





def extgcd(a, b):

    if b == 0:

        return [1, 0, a]

    x, y, g = extgcd(b, a % b)

    return [y, x - a//b * y, g]





def mod_inverse(a, m):

    x, y, _ = extgcd(a, m)

    return (m + x % m) % m





N = int(eval(input()))

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

_lcm = 1

for a in A:

    _lcm = lcm(_lcm, a)

ans = 0

for a in A:

    ans += _lcm * mod_inverse(a, 1000000007)

print((ans % 1000000007))
from fractions import gcd





def lcm(x, y):

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





def extgcd(a, b):

    if b == 0:

        return [1, 0, a]

    x, y, g = extgcd(b, a % b)

    return [y, x - a//b * y, g]





def mod_inverse(a, m):

    x, y, _ = extgcd(a, m)

    return (m + x % m) % m





N = int(eval(input()))

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

_lcm = 1

for a in A:

    _lcm = lcm(_lcm, a)

ans = 0

big = 1000000007

_lcm %= big

for a in A:

    ans += _lcm * mod_inverse(a, big)

print((ans % big))
from fractions import gcd


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


def extgcd(a, b):
    if b == 0:
        return [1, 0, a]
    x, y, g = extgcd(b, a % b)
    return [y, x - a // b * y, g]


def mod_inverse(a, m):
    x, y, _ = extgcd(a, m)
    return (m + x % m) % m


N = int(eval(input()))
A = list(map(int, input().split()))
_lcm = 1
for a in A:
    _lcm = lcm(_lcm, a)
ans = 0
for a in A:
    ans += _lcm * mod_inverse(a, 1000000007)
print((ans % 1000000007))

from fractions import gcd


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


def extgcd(a, b):
    if b == 0:
        return [1, 0, a]
    x, y, g = extgcd(b, a % b)
    return [y, x - a // b * y, g]


def mod_inverse(a, m):
    x, y, _ = extgcd(a, m)
    return (m + x % m) % m


N = int(eval(input()))
A = list(map(int, input().split()))
_lcm = 1
for a in A:
    _lcm = lcm(_lcm, a)
ans = 0
big = 1000000007
_lcm %= big
for a in A:
    ans += _lcm * mod_inverse(a, big)
print((ans % big))

+big = 1000000007 +_lcm %= big -    ans += _lcm * mod_inverse(a, 1000000007) -print((ans % 1000000007)) +    ans += _lcm * mod_inverse(a, big) +print((ans % big))