def gcd(x, y):

    while y > 0:

        r = x%y

        x = y

        y = r

    return x



def lcm(x, y):

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



n = int(eval(input()))

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



l = 1

for x in a:

    l = lcm(l, x)



ans = 0

for x in a:

    ans += l//x



print((ans%(10**9+7)))
def gcd(x, y):

    while y > 0:

        r = x%y

        x = y

        y = r

    return x



def lcm(x, y):

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



n = int(eval(input()))

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



l = 1

for x in a:

    l = lcm(x, l)



ans = 0

for x in a:

    ans += l//x



print((ans%(10**9+7)))
def gcd(x, y):
    while y > 0:
        r = x % y
        x = y
        y = r
    return x


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


n = int(eval(input()))
a = list(map(int, input().split()))
l = 1
for x in a:
    l = lcm(l, x)
ans = 0
for x in a:
    ans += l // x
print((ans % (10**9 + 7)))

def gcd(x, y):
    while y > 0:
        r = x % y
        x = y
        y = r
    return x


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


n = int(eval(input()))
a = list(map(int, input().split()))
l = 1
for x in a:
    l = lcm(x, l)
ans = 0
for x in a:
    ans += l // x
print((ans % (10**9 + 7)))

-    return x // gcd(x, y) * y +    return x // gcd(y, x) * y -    l = lcm(l, x) +    l = lcm(x, l)