#!usr/bin/env python3

from collections import defaultdict, deque, Counter, OrderedDict

from bisect import bisect_left, bisect_right

from functools import reduce, lru_cache

from heapq import heappush, heappop, heapify



import itertools, bisect

import math, fractions

import sys, copy



def L(): return sys.stdin.readline().split()

def I(): return int(sys.stdin.readline().rstrip())

def S(): return list(sys.stdin.readline().rstrip())

def LI(): return [int(x) for x in sys.stdin.readline().split()]

def LI1(): return [int(x) - 1 for x in sys.stdin.readline().split()]

def LS(): return [list(x) for x in sys.stdin.readline().split()]

def IR(n): return [I() for _ in range(n)]

def LIR(n): return [LI() for _ in range(n)]

def LIR1(n): return [LI1() for _ in range(n)]

def SR(n): return [S() for _ in range(n)]

def LSR(n): return [LS() for _ in range(n)]

def LR(n): return [L() for _ in range(n)]



alphabets = "abcdefghijklmnopqrstuvwxyz"

ALPHABETS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"



sys.setrecursionlimit(1000000)

dire = [[1, 0], [0, 1], [-1, 0], [0, -1]]

dire8 = [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]]

MOD = 1000000007



def main():

    N = I()

    A = LI()



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

    l = reduce(lcm, A, 1)



    ans = 0

    for ai in A:

        ans = (ans + l * pow(ai, MOD - 2, MOD)) % MOD



    print(ans)











if __name__ == '__main__':

    main()
#!usr/bin/env python3

from collections import defaultdict, deque, Counter, OrderedDict

from bisect import bisect_left, bisect_right

from functools import reduce, lru_cache

from heapq import heappush, heappop, heapify



import itertools, bisect

import math, fractions

import sys, copy



def L(): return sys.stdin.readline().split()

def I(): return int(sys.stdin.readline().rstrip())

def S(): return list(sys.stdin.readline().rstrip())

def LI(): return [int(x) for x in sys.stdin.readline().split()]

def LI1(): return [int(x) - 1 for x in sys.stdin.readline().split()]

def LS(): return [list(x) for x in sys.stdin.readline().split()]

def IR(n): return [I() for _ in range(n)]

def LIR(n): return [LI() for _ in range(n)]

def LIR1(n): return [LI1() for _ in range(n)]

def SR(n): return [S() for _ in range(n)]

def LSR(n): return [LS() for _ in range(n)]

def LR(n): return [L() for _ in range(n)]



alphabets = "abcdefghijklmnopqrstuvwxyz"

ALPHABETS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"



sys.setrecursionlimit(1000000)

dire = [[1, 0], [0, 1], [-1, 0], [0, -1]]

dire8 = [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]]

MOD = 1000000007



def main():

    N = I()

    A = LI()



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

    l = reduce(lcm, A, 1) % MOD



    ans = 0

    for ai in A:

        ans = (ans + l * pow(ai, MOD - 2, MOD)) % MOD



    print(ans)











if __name__ == '__main__':

    main()
#!usr/bin/env python3
from collections import defaultdict, deque, Counter, OrderedDict
from bisect import bisect_left, bisect_right
from functools import reduce, lru_cache
from heapq import heappush, heappop, heapify
import itertools, bisect
import math, fractions
import sys, copy


def L():
    return sys.stdin.readline().split()


def I():
    return int(sys.stdin.readline().rstrip())


def S():
    return list(sys.stdin.readline().rstrip())


def LI():
    return [int(x) for x in sys.stdin.readline().split()]


def LI1():
    return [int(x) - 1 for x in sys.stdin.readline().split()]


def LS():
    return [list(x) for x in sys.stdin.readline().split()]


def IR(n):
    return [I() for _ in range(n)]


def LIR(n):
    return [LI() for _ in range(n)]


def LIR1(n):
    return [LI1() for _ in range(n)]


def SR(n):
    return [S() for _ in range(n)]


def LSR(n):
    return [LS() for _ in range(n)]


def LR(n):
    return [L() for _ in range(n)]


alphabets = "abcdefghijklmnopqrstuvwxyz"
ALPHABETS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
sys.setrecursionlimit(1000000)
dire = [[1, 0], [0, 1], [-1, 0], [0, -1]]
dire8 = [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]]
MOD = 1000000007


def main():
    N = I()
    A = LI()

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

    l = reduce(lcm, A, 1)
    ans = 0
    for ai in A:
        ans = (ans + l * pow(ai, MOD - 2, MOD)) % MOD
    print(ans)


if __name__ == "__main__":
    main()

#!usr/bin/env python3
from collections import defaultdict, deque, Counter, OrderedDict
from bisect import bisect_left, bisect_right
from functools import reduce, lru_cache
from heapq import heappush, heappop, heapify
import itertools, bisect
import math, fractions
import sys, copy


def L():
    return sys.stdin.readline().split()


def I():
    return int(sys.stdin.readline().rstrip())


def S():
    return list(sys.stdin.readline().rstrip())


def LI():
    return [int(x) for x in sys.stdin.readline().split()]


def LI1():
    return [int(x) - 1 for x in sys.stdin.readline().split()]


def LS():
    return [list(x) for x in sys.stdin.readline().split()]


def IR(n):
    return [I() for _ in range(n)]


def LIR(n):
    return [LI() for _ in range(n)]


def LIR1(n):
    return [LI1() for _ in range(n)]


def SR(n):
    return [S() for _ in range(n)]


def LSR(n):
    return [LS() for _ in range(n)]


def LR(n):
    return [L() for _ in range(n)]


alphabets = "abcdefghijklmnopqrstuvwxyz"
ALPHABETS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
sys.setrecursionlimit(1000000)
dire = [[1, 0], [0, 1], [-1, 0], [0, -1]]
dire8 = [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]]
MOD = 1000000007


def main():
    N = I()
    A = LI()

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

    l = reduce(lcm, A, 1) % MOD
    ans = 0
    for ai in A:
        ans = (ans + l * pow(ai, MOD - 2, MOD)) % MOD
    print(ans)


if __name__ == "__main__":
    main()

-    l = reduce(lcm, A, 1) +    l = reduce(lcm, A, 1) % MOD