import math

from fractions import gcd

from functools import reduce



DIV=10**9+7



def lcm(a,b):

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



N=int(eval(input()))

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

g=reduce(lcm,A)



ans=sum(list([g//x for x in A]))

print((ans%DIV))
import sys

readline = sys.stdin.readline



N = int(readline())

A = list(map(int,readline().split()))

DIV = 10 ** 9 + 7

import math



from functools import reduce



def lcm(a,b,):

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



G = reduce(lcm, A)

ans = sum([G // x for x in A])



print((ans % DIV))
import math
from fractions import gcd
from functools import reduce

DIV = 10**9 + 7


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


N = int(eval(input()))
A = list(map(int, input().split()))
g = reduce(lcm, A)
ans = sum(list([g // x for x in A]))
print((ans % DIV))

import sys

readline = sys.stdin.readline
N = int(readline())
A = list(map(int, readline().split()))
DIV = 10**9 + 7
import math
from functools import reduce


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


G = reduce(lcm, A)
ans = sum([G // x for x in A])
print((ans % DIV))

+import sys + +readline = sys.stdin.readline +N = int(readline()) +A = list(map(int, readline().split())) +DIV = 10**9 + 7 -from fractions import gcd -DIV = 10**9 + 7 + +def lcm( +    a, +    b, +): +    return (a // math.gcd(a, b)) * b -def lcm(a, b): -    return a * b // (gcd(a, b)) - - -N = int(eval(input())) -A = list(map(int, input().split())) -g = reduce(lcm, A) -ans = sum(list([g // x for x in A])) +G = reduce(lcm, A) +ans = sum([G // x for x in A])