from fractions import gcd



n=int(eval(input()))

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

mod=10**9+7





lcm=1

for i in a:

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



'''

ans=0

mod=10**9+7

for i in a:

 ans+=lcm//i

 ans%=mod

print(ans)



'''

'''

from functools import reduce

lcm=reduce(lambda x,y :(x*y)//gcd(x,y),a)

'''



'''

ans=0

mod=10**9+7

for i in a:

 ans+=lcm//i

 ans%=mod

'''

ans=sum(lcm//i for i in a)

ans%=mod

print(ans)
from fractions import gcd



n=int(eval(input()))

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

mod=10**9+7



'''

lcm=1

for i in a:

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

'''



'''

ans=0

mod=10**9+7

for i in a:

 ans+=lcm//i

 ans%=mod

print(ans)



'''

'''

from functools import reduce

lcm=reduce(lambda x,y :(x*y)//gcd(x,y),a)

'''

from functools import reduce

lcm=reduce(lambda x,y :x*(y//gcd(x,y)),a)



'''

ans=0

mod=10**9+7

for i in a:

 ans+=lcm//i

 ans%=mod

'''

ans=sum(lcm//i for i in a)

ans%=mod

print(ans)
from fractions import gcd

n = int(eval(input()))
a = list(map(int, input().split()))
mod = 10**9 + 7
lcm = 1
for i in a:
    lcm = (lcm * i) // gcd(lcm, i)
"""
ans=0
mod=10**9+7
for i in a:
 ans+=lcm//i
 ans%=mod
print(ans)
"""
"""
from functools import reduce
lcm=reduce(lambda x,y :(x*y)//gcd(x,y),a)
"""
"""
ans=0
mod=10**9+7
for i in a:
 ans+=lcm//i
 ans%=mod
"""
ans = sum(lcm // i for i in a)
ans %= mod
print(ans)

from fractions import gcd

n = int(eval(input()))
a = list(map(int, input().split()))
mod = 10**9 + 7
"""
lcm=1
for i in a:
 lcm=(lcm*i)//gcd(lcm,i)
"""
"""
ans=0
mod=10**9+7
for i in a:
 ans+=lcm//i
 ans%=mod
print(ans)
"""
"""
from functools import reduce
lcm=reduce(lambda x,y :(x*y)//gcd(x,y),a)
"""
from functools import reduce

lcm = reduce(lambda x, y: x * (y // gcd(x, y)), a)
"""
ans=0
mod=10**9+7
for i in a:
 ans+=lcm//i
 ans%=mod
"""
ans = sum(lcm // i for i in a)
ans %= mod
print(ans)

-lcm = 1 +""" +lcm=1 -    lcm = (lcm * i) // gcd(lcm, i) + lcm=(lcm*i)//gcd(lcm,i) +""" +from functools import reduce + +lcm = reduce(lambda x, y: x * (y // gcd(x, y)), a)