

def gcd(a, b):

    if(a < b):

        a, b = b, a

    if(b == 0):

        return a

    return gcd(b, a % b)



def lcm(a, b):

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



N = int(eval(input()))

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

l = A[0]

for a in A:

    l = lcm(l, a)

ans = 0

mod = 10**9+7

for a in A:

    ans += (l * pow(a, mod-2, mod))%mod

    ans %= mod

print(ans)



def gcd(a, b):

    if(a < b):

        a, b = b, a

    if(b == 0):

        return a

    return gcd(b, a % b)



def lcm(a, b):

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



N = int(eval(input()))

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

l = 1

for a in A:

    l = lcm(l, a)

ans = 0

mod = 10**9+7

l %= mod

for a in A:

    ans += (l * pow(a, mod-2, mod))%mod

    ans %= mod

print(ans)

def gcd(a, b):
    if a < b:
        a, b = b, a
    if b == 0:
        return a
    return gcd(b, a % b)


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


N = int(eval(input()))
A = list(map(int, input().split()))
l = A[0]
for a in A:
    l = lcm(l, a)
ans = 0
mod = 10**9 + 7
for a in A:
    ans += (l * pow(a, mod - 2, mod)) % mod
    ans %= mod
print(ans)

def gcd(a, b):
    if a < b:
        a, b = b, a
    if b == 0:
        return a
    return gcd(b, a % b)


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


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

-l = A[0] +l = 1 +l %= mod