#!python3



iim = lambda: list(map(int, input().rstrip().split()))



def factor(n):

    ans = []

    i = 0

    while n & 1 == 0:

        n >>= 1

        i += 1



    if i > 0:

        ans.append((2, i))



    for i in range(3, int(n**.5) +1, 2):

        x, y = divmod(n, i)



        if y == 0:

            j = 1

            x1 = x

            while True:

                x1, y = divmod(x, i)

                if y == 0:

                    x = x1

                    j += 1

                else:

                    ans.append((i, j))

                    break

            n = x



    if n > 1:

        ans.append((n, 1))

    return ans



def resolve():

    N = int(eval(input()))

    A = list(iim())

    mod = 10**9 + 7



    c = 1

    c2 = dict()

    for a in A:

        for n, m in factor(a):

            if n in c2:

                c2[n] = max(c2[n], m)

            else:

                c2[n] = m



    c3 = 1

    for n, m in list(c2.items()):

        c3 *= n**m%mod % mod



    s = 0

    for a in A:

        s += c3*pow(a, mod-2, mod)%mod

        s %= mod



    print(s)



if __name__ == "__main__":

    resolve()

#!python3



from fractions import gcd

iim = lambda: list(map(int, input().rstrip().split()))



def factor(n):

    ans = []

    i = 0

    while n & 1 == 0:

        n >>= 1

        i += 1



    if i > 0:

        ans.append((2, i))



    for i in range(3, int(n**.5) +1, 2):

        x, y = divmod(n, i)



        if y == 0:

            j = 1

            x1 = x

            while True:

                x1, y = divmod(x, i)

                if y == 0:

                    x = x1

                    j += 1

                else:

                    ans.append((i, j))

                    break

            n = x



    if n > 1:

        ans.append((n, 1))

    return ans



def resolve():

    N = int(eval(input()))

    A = list(iim())

    mod = 10**9 + 7



    lcm = 1

    #c2 = dict()

    #for a in A:

    #    for n, m in factor(a):

    #        if n in c2:

    #            c2[n] = max(c2[n], m)

    #        else:

    #            c2[n] = m



    #lcm = 1

    #for n, m in c2.items():

    #    lcm *= n**m%mod % mod

    for a in A:

        lcm = lcm // gcd(lcm, a) * a

    lcm %= mod



    s = 0

    for a in A:

        s += lcm*pow(a, mod-2, mod)%mod

        s %= mod



    print(s)



if __name__ == "__main__":

    resolve()

#!python3
iim = lambda: list(map(int, input().rstrip().split()))


def factor(n):
    ans = []
    i = 0
    while n & 1 == 0:
        n >>= 1
        i += 1
    if i > 0:
        ans.append((2, i))
    for i in range(3, int(n**0.5) + 1, 2):
        x, y = divmod(n, i)
        if y == 0:
            j = 1
            x1 = x
            while True:
                x1, y = divmod(x, i)
                if y == 0:
                    x = x1
                    j += 1
                else:
                    ans.append((i, j))
                    break
            n = x
    if n > 1:
        ans.append((n, 1))
    return ans


def resolve():
    N = int(eval(input()))
    A = list(iim())
    mod = 10**9 + 7
    c = 1
    c2 = dict()
    for a in A:
        for n, m in factor(a):
            if n in c2:
                c2[n] = max(c2[n], m)
            else:
                c2[n] = m
    c3 = 1
    for n, m in list(c2.items()):
        c3 *= n**m % mod % mod
    s = 0
    for a in A:
        s += c3 * pow(a, mod - 2, mod) % mod
        s %= mod
    print(s)


if __name__ == "__main__":
    resolve()

#!python3
from fractions import gcd

iim = lambda: list(map(int, input().rstrip().split()))


def factor(n):
    ans = []
    i = 0
    while n & 1 == 0:
        n >>= 1
        i += 1
    if i > 0:
        ans.append((2, i))
    for i in range(3, int(n**0.5) + 1, 2):
        x, y = divmod(n, i)
        if y == 0:
            j = 1
            x1 = x
            while True:
                x1, y = divmod(x, i)
                if y == 0:
                    x = x1
                    j += 1
                else:
                    ans.append((i, j))
                    break
            n = x
    if n > 1:
        ans.append((n, 1))
    return ans


def resolve():
    N = int(eval(input()))
    A = list(iim())
    mod = 10**9 + 7
    lcm = 1
    # c2 = dict()
    # for a in A:
    #    for n, m in factor(a):
    #        if n in c2:
    #            c2[n] = max(c2[n], m)
    #        else:
    #            c2[n] = m
    # lcm = 1
    # for n, m in c2.items():
    #    lcm *= n**m%mod % mod
    for a in A:
        lcm = lcm // gcd(lcm, a) * a
    lcm %= mod
    s = 0
    for a in A:
        s += lcm * pow(a, mod - 2, mod) % mod
        s %= mod
    print(s)


if __name__ == "__main__":
    resolve()

+from fractions import gcd + -    c = 1 -    c2 = dict() +    lcm = 1 +    # c2 = dict() +    # for a in A: +    #    for n, m in factor(a): +    #        if n in c2: +    #            c2[n] = max(c2[n], m) +    #        else: +    #            c2[n] = m +    # lcm = 1 +    # for n, m in c2.items(): +    #    lcm *= n**m%mod % mod -        for n, m in factor(a): -            if n in c2: -                c2[n] = max(c2[n], m) -            else: -                c2[n] = m -    c3 = 1 -    for n, m in list(c2.items()): -        c3 *= n**m % mod % mod +        lcm = lcm // gcd(lcm, a) * a +    lcm %= mod -        s += c3 * pow(a, mod - 2, mod) % mod +        s += lcm * pow(a, mod - 2, mod) % mod