from fractions import gcd

def lcm(x,y):

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

n=int(eval(input()))

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

mod=10**9+7

lcm_val=a[0]

for i in range(n-1):

  lcm_val=lcm(lcm_val,a[i+1])

# print(lcm_val)

b=[]

ans=0

for aa in a:

  ans+=lcm_val//aa



print((ans%mod))
from fractions import gcd

def lcm(a,b):

  return a*b//gcd(a,b)

n=int(eval(input()))

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

ans=0

mod=10**9+7

l=a[0]

for i in range(1,n):

  l=lcm(l,a[i])

l%=mod

for aa in a:

  #　mod(10**9+7)逆元

  ans+=l*pow(aa,mod-2,mod)%mod

  ans%=mod

print(ans)
from fractions import gcd


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


n = int(eval(input()))
a = list(map(int, input().split()))
mod = 10**9 + 7
lcm_val = a[0]
for i in range(n - 1):
    lcm_val = lcm(lcm_val, a[i + 1])
# print(lcm_val)
b = []
ans = 0
for aa in a:
    ans += lcm_val // aa
print((ans % mod))

from fractions import gcd


def lcm(a, b):
    return a * b // gcd(a, b)


n = int(eval(input()))
a = list(map(int, input().split()))
ans = 0
mod = 10**9 + 7
l = a[0]
for i in range(1, n):
    l = lcm(l, a[i])
l %= mod
for aa in a:
    # 　mod(10**9+7)逆元
    ans += l * pow(aa, mod - 2, mod) % mod
    ans %= mod
print(ans)

-def lcm(x, y): -    return (x * y) // gcd(x, y) +def lcm(a, b): +    return a * b // gcd(a, b) +ans = 0 -lcm_val = a[0] -for i in range(n - 1): -    lcm_val = lcm(lcm_val, a[i + 1]) -# print(lcm_val) -b = [] -ans = 0 +l = a[0] +for i in range(1, n): +    l = lcm(l, a[i]) +l %= mod -    ans += lcm_val // aa -print((ans % mod)) +    # 　mod(10**9+7)逆元 +    ans += l * pow(aa, mod - 2, mod) % mod +    ans %= mod +print(ans)