from fractions import gcd



from functools import reduce





n = int(eval(input()))

a_list = [int(x) for x in input().split()]



temp = reduce(lambda x, y: (x * y) // gcd(x, y), a_list)



mod = 10 ** 9 + 7

ans = sum([temp // a for a in a_list]) % mod

print(ans)
from fractions import gcd



from functools import reduce





n = int(eval(input()))

a_list = [int(x) for x in input().split()]



temp = 1

for a in a_list:

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



mod = 10 ** 9 + 7

ans = sum([temp // a for a in a_list]) % mod

print(ans)
from fractions import gcd
from functools import reduce

n = int(eval(input()))
a_list = [int(x) for x in input().split()]
temp = reduce(lambda x, y: (x * y) // gcd(x, y), a_list)
mod = 10**9 + 7
ans = sum([temp // a for a in a_list]) % mod
print(ans)

from fractions import gcd
from functools import reduce

n = int(eval(input()))
a_list = [int(x) for x in input().split()]
temp = 1
for a in a_list:
    temp *= a // gcd(a, temp)
mod = 10**9 + 7
ans = sum([temp // a for a in a_list]) % mod
print(ans)

-temp = reduce(lambda x, y: (x * y) // gcd(x, y), a_list) +temp = 1 +for a in a_list: +    temp *= a // gcd(a, temp)