from collections import Counter,defaultdict,deque

from heapq import heappop,heappush,heapify

import sys,bisect,math,itertools,pprint,fractions

sys.setrecursionlimit(10**8)

mod = 10**9+7

mod2 = 998244353

INF = float('inf')

def inp(): return int(sys.stdin.readline())

def inpl(): return list(map(int, sys.stdin.readline().split()))

def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))





n = inp()

a = inpl()

g = 1

res = 0

for i in a:

    g = i*g//fractions.gcd(i,g)

for i in a:

    res += g//i

print((res%mod))

from collections import Counter,defaultdict,deque

from heapq import heappop,heappush,heapify

import sys,bisect,math,itertools,pprint,fractions

sys.setrecursionlimit(10**8)

mod = 10**9+7

INF = float('inf')

def inp(): return int(sys.stdin.readline())

def inpl(): return list(map(int, sys.stdin.readline().split()))

def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))





n = inp()

aa = inpl()

g = 1

for a in aa:

    g = a*g//fractions.gcd(a,g)

g %= mod

res = 0

for a in aa:

    res += g*pow(a,mod-2,mod)

    res %= mod

print(res)
from collections import Counter, defaultdict, deque
from heapq import heappop, heappush, heapify
import sys, bisect, math, itertools, pprint, fractions

sys.setrecursionlimit(10**8)
mod = 10**9 + 7
mod2 = 998244353
INF = float("inf")


def inp():
    return int(sys.stdin.readline())


def inpl():
    return list(map(int, sys.stdin.readline().split()))


def inpln(n):
    return list(int(sys.stdin.readline()) for i in range(n))


n = inp()
a = inpl()
g = 1
res = 0
for i in a:
    g = i * g // fractions.gcd(i, g)
for i in a:
    res += g // i
print((res % mod))

from collections import Counter, defaultdict, deque
from heapq import heappop, heappush, heapify
import sys, bisect, math, itertools, pprint, fractions

sys.setrecursionlimit(10**8)
mod = 10**9 + 7
INF = float("inf")


def inp():
    return int(sys.stdin.readline())


def inpl():
    return list(map(int, sys.stdin.readline().split()))


def inpln(n):
    return list(int(sys.stdin.readline()) for i in range(n))


n = inp()
aa = inpl()
g = 1
for a in aa:
    g = a * g // fractions.gcd(a, g)
g %= mod
res = 0
for a in aa:
    res += g * pow(a, mod - 2, mod)
    res %= mod
print(res)

-mod2 = 998244353 -a = inpl() +aa = inpl() +for a in aa: +    g = a * g // fractions.gcd(a, g) +g %= mod -for i in a: -    g = i * g // fractions.gcd(i, g) -for i in a: -    res += g // i -print((res % mod)) +for a in aa: +    res += g * pow(a, mod - 2, mod) +    res %= mod +print(res)