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*y//gcd(x,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: x*(y//gcd(x,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: x * y // gcd(x, 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: x * (y // gcd(x, y)), A)
answer = sum(lcm // x for x in A)
answer %= MOD
print(answer)

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