import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines



from fractions import gcd

from functools import reduce



N,*A = list(map(int,read().split()))



MOD = 10 ** 9 + 7



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



answer = sum(lcm//x for x in A)

answer %= MOD

print(answer)
import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines



from fractions import gcd

from functools import reduce



N,*A = list(map(int,read().split()))



MOD = 10 ** 9 + 7



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



answer = sum(lcm//x for x in A)

answer %= MOD

print(answer)

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
from fractions import gcd
from functools import reduce

N, *A = list(map(int, read().split()))
MOD = 10**9 + 7
lcm = reduce(lambda x, y: x // gcd(x, y) * y, A)
answer = sum(lcm // x for x in A)
answer %= MOD
print(answer)

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
from fractions import gcd
from functools import reduce

N, *A = list(map(int, read().split()))
MOD = 10**9 + 7
lcm = reduce(lambda x, y: y // gcd(x, y) * x, A)
answer = sum(lcm // x for x in A)
answer %= MOD
print(answer)

-lcm = reduce(lambda x, y: x // gcd(x, y) * y, A) +lcm = reduce(lambda x, y: y // gcd(x, y) * x, A)