# import 周り

from fractions import gcd



# 定数関係

mod = 10 ** 9 + 7



# 補助関数

def inv(a):

    b, u, v = mod, 1, 0

    while b != 0:

        t = a // b

        a, b = b, a - t * b

        u, v = v, u - t * v

    return u



if __name__ == '__main__':

    #入力関係

    n = int(eval(input()))

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



    U, V = 0, 1

    for ele in A:

      V = V * ele // gcd(V, ele) # LCMを計算

      U += inv(ele)

    V %= mod

    print((U * V % mod))

# import 周り

from fractions import gcd



# 定数関係

mod = 10 ** 9 + 7



# 補助関数

def inv(a):

    b, u, v = mod, 1, 0

    while b != 0:

        t = a // b

        a, b = b, a - t * b

        u, v = v, u - t * v

    return u



if __name__ == '__main__':

    #入力関係

    n = int(eval(input()))

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



    U, V = 0, 1

    for ele in A:

      V *= ele // gcd(V, ele)# LCMを計算

      U += inv(ele)

    V %= mod

    print((U * V % mod))

# import 周り
from fractions import gcd

# 定数関係
mod = 10**9 + 7
# 補助関数
def inv(a):
    b, u, v = mod, 1, 0
    while b != 0:
        t = a // b
        a, b = b, a - t * b
        u, v = v, u - t * v
    return u


if __name__ == "__main__":
    # 入力関係
    n = int(eval(input()))
    A = list(map(int, input().split()))
    U, V = 0, 1
    for ele in A:
        V = V * ele // gcd(V, ele)  # LCMを計算
        U += inv(ele)
    V %= mod
    print((U * V % mod))

# import 周り
from fractions import gcd

# 定数関係
mod = 10**9 + 7
# 補助関数
def inv(a):
    b, u, v = mod, 1, 0
    while b != 0:
        t = a // b
        a, b = b, a - t * b
        u, v = v, u - t * v
    return u


if __name__ == "__main__":
    # 入力関係
    n = int(eval(input()))
    A = list(map(int, input().split()))
    U, V = 0, 1
    for ele in A:
        V *= ele // gcd(V, ele)  # LCMを計算
        U += inv(ele)
    V %= mod
    print((U * V % mod))

-        V = V * ele // gcd(V, ele)  # LCMを計算 +        V *= ele // gcd(V, ele)  # LCMを計算