from fractions import gcd

 

N=int(eval(input()))

a_list = tuple(int(i) for i in input().split())

MOD = 10**9+7



def cal_lcm(a, b):

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



lcm = 1

for i in range(N):

  lcm = cal_lcm(lcm, a_list[i])

  

ans = 0

for i in range(N):

  ans += lcm//a_list[i]

print((ans%MOD))
import sys

input = sys.stdin.readline

from fractions import gcd

 

N=int(eval(input()))

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

MOD = 10**9+7



def cal_lcm(a, b):

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

 

lcm = 1

ans = 0

for i in range(N):

  lcm_ = cal_lcm(lcm, a_list[i])

  ans = ans*(lcm_//lcm)

  ans = (ans + (lcm_//a_list[i]))

  lcm = lcm_



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

N = int(eval(input()))
a_list = tuple(int(i) for i in input().split())
MOD = 10**9 + 7


def cal_lcm(a, b):
    return int(a * b // gcd(a, b))


lcm = 1
for i in range(N):
    lcm = cal_lcm(lcm, a_list[i])
ans = 0
for i in range(N):
    ans += lcm // a_list[i]
print((ans % MOD))

import sys

input = sys.stdin.readline
from fractions import gcd

N = int(eval(input()))
a_list = list(map(int, input().split()))
MOD = 10**9 + 7


def cal_lcm(a, b):
    return int(a * b // gcd(a, b))


lcm = 1
ans = 0
for i in range(N):
    lcm_ = cal_lcm(lcm, a_list[i])
    ans = ans * (lcm_ // lcm)
    ans = ans + (lcm_ // a_list[i])
    lcm = lcm_
print((ans % MOD))

+import sys + +input = sys.stdin.readline -a_list = tuple(int(i) for i in input().split()) +a_list = list(map(int, input().split())) -for i in range(N): -    lcm = cal_lcm(lcm, a_list[i]) -    ans += lcm // a_list[i] +    lcm_ = cal_lcm(lcm, a_list[i]) +    ans = ans * (lcm_ // lcm) +    ans = ans + (lcm_ // a_list[i]) +    lcm = lcm_