from functools import reduce



def solve():

    MOD = 10**9 + 7



    def gcd(a, b):

        while b:

            a, b = b, a%b

        return a

    def lcm(a, b):

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



    N = int(eval(input()))

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



    lcmA = reduce(lcm, As)

    #print('lcmA:', lcmA)



    ans = 0

    for A in As:

        ans += lcmA // A

    ans %= MOD



    print(ans)



solve()

from collections import Counter



def solve():

    MOD = 10**9 + 7



    N = int(eval(input()))

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



    def getPrimeFactors(x):

        anss = []

        while x%2 == 0:

            anss.append(2)

            x //= 2

        for d in range(3, int(x**0.5)+1, 2):

            while x%d == 0:

                anss.append(d)

                x //= d

        if x != 1:

            anss.append(x)

        return anss



    maxCnt = Counter()

    for A in As:

        PFs = getPrimeFactors(A)

        cnt = Counter(PFs)

        maxCnt |= cnt



    LCM = 1

    for p, e in list(maxCnt.items()):

        LCM *= pow(p, e, MOD)

        LCM %= MOD



    maxA = max(As)



    def getInvs(n, MOD):

        invs = [1] * (n+1)

        for x in range(2, n+1):

            invs[x] = (-(MOD//x) * invs[MOD%x]) % MOD

        return invs

    invs = getInvs(maxA, MOD)



    sumInv = 0

    for A in As:

        sumInv += invs[A]

        sumInv %= MOD



    ans = LCM * sumInv % MOD

    print(ans)





solve()

from functools import reduce


def solve():
    MOD = 10**9 + 7

    def gcd(a, b):
        while b:
            a, b = b, a % b
        return a

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

    N = int(eval(input()))
    As = list(map(int, input().split()))
    lcmA = reduce(lcm, As)
    # print('lcmA:', lcmA)
    ans = 0
    for A in As:
        ans += lcmA // A
    ans %= MOD
    print(ans)


solve()

from collections import Counter


def solve():
    MOD = 10**9 + 7
    N = int(eval(input()))
    As = list(map(int, input().split()))

    def getPrimeFactors(x):
        anss = []
        while x % 2 == 0:
            anss.append(2)
            x //= 2
        for d in range(3, int(x**0.5) + 1, 2):
            while x % d == 0:
                anss.append(d)
                x //= d
        if x != 1:
            anss.append(x)
        return anss

    maxCnt = Counter()
    for A in As:
        PFs = getPrimeFactors(A)
        cnt = Counter(PFs)
        maxCnt |= cnt
    LCM = 1
    for p, e in list(maxCnt.items()):
        LCM *= pow(p, e, MOD)
        LCM %= MOD
    maxA = max(As)

    def getInvs(n, MOD):
        invs = [1] * (n + 1)
        for x in range(2, n + 1):
            invs[x] = (-(MOD // x) * invs[MOD % x]) % MOD
        return invs

    invs = getInvs(maxA, MOD)
    sumInv = 0
    for A in As:
        sumInv += invs[A]
        sumInv %= MOD
    ans = LCM * sumInv % MOD
    print(ans)


solve()

-from functools import reduce +from collections import Counter - -    def gcd(a, b): -        while b: -            a, b = b, a % b -        return a - -    def lcm(a, b): -        return a // gcd(a, b) * b - -    lcmA = reduce(lcm, As) -    # print('lcmA:', lcmA) -    ans = 0 + +    def getPrimeFactors(x): +        anss = [] +        while x % 2 == 0: +            anss.append(2) +            x //= 2 +        for d in range(3, int(x**0.5) + 1, 2): +            while x % d == 0: +                anss.append(d) +                x //= d +        if x != 1: +            anss.append(x) +        return anss + +    maxCnt = Counter() -        ans += lcmA // A -    ans %= MOD +        PFs = getPrimeFactors(A) +        cnt = Counter(PFs) +        maxCnt |= cnt +    LCM = 1 +    for p, e in list(maxCnt.items()): +        LCM *= pow(p, e, MOD) +        LCM %= MOD +    maxA = max(As) + +    def getInvs(n, MOD): +        invs = [1] * (n + 1) +        for x in range(2, n + 1): +            invs[x] = (-(MOD // x) * invs[MOD % x]) % MOD +        return invs + +    invs = getInvs(maxA, MOD) +    sumInv = 0 +    for A in As: +        sumInv += invs[A] +        sumInv %= MOD +    ans = LCM * sumInv % MOD