from collections import defaultdict



class LCM_mod:

    """

    最小公倍数の計算を行う

    オーバーフローが発生しないように素因数分解し,

    因数の積を逐次余りに置き換えて最小公倍数を導出する.

    """

    def __init__(self, max_num, p=10**9+7):

        self.max_num = max_num + 1

        self.p = p

        self.prime = [0 for _ in range(self.max_num)]

        self.max_map = defaultdict(int)

        self.sieve()



    def rep_sqr(self, base, k):

        # 繰り返し二乗法

        if k == 0:

            return 1

        elif k % 2 == 0:

            return (self.rep_sqr(base, k / 2) ** 2) % self.p

        else:

            return (self.rep_sqr(base, k - 1) * base) % self.p



    def sieve(self):

        """

        エラトステネスの篩　O(n)

        nまでに含まれる素数を導出

        """

        self.prime[0], self.prime[1] = 1, 1

        for i in range(2, self.max_num):

            if self.prime[i]:

                continue

            for j in range(i * 2, self.max_num, i):

                if self.prime[j]:

                    continue

                self.prime[j] = i

            self.prime[i] = i



    def lcm_list_mod(self, arr):

        """

        listのそれぞれの要素について、素因数分解する

        それぞれの因数について最大であれば更新する

        """

        for i in range(len(arr)):

            num = arr[i]

            d = defaultdict(int)



            while num > 1:

                fact = self.prime[num]

                d[fact] += 1

                num //= fact



            for i in list(d.keys()):

                self.max_map[i] = max(self.max_map[i], d[i])



        ans = 1

        for i in list(self.max_map.keys()):

            ans = (ans * self.rep_sqr(i, self.max_map[i])) % self.p

        return ans





def rep_sqr(base, k, mod):

    if k == 0:

        return 1

    elif k % 2 == 0:

        return (rep_sqr(base, k / 2, mod) ** 2) % mod

    else:

        return (rep_sqr(base, k - 1, mod) * base) % mod



# a^(-1) == a^(m-2)



def flt(a, mod):

    return rep_sqr(a, mod-2, mod)



n = int(eval(input()))

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

MOD = 10**9+7



lcm_mod = LCM_mod(max(a), MOD)



lcm_all = lcm_mod.lcm_list_mod(a)



b = list([lcm_all * flt(x, MOD) for x in a])

ans = 0

for i in range(len(b)):

    ans += b[i]

    ans %= MOD

print(ans)

from collections import defaultdict



class LCM_mod:

    """

    最小公倍数の計算を行う

    オーバーフローが発生しないように素因数分解し,

    因数の積を逐次余りに置き換えて最小公倍数を導出する.

    """

    def __init__(self, max_num, p=10**9+7):

        self.max_num = max_num + 1

        self.p = p

        self.prime = [0 for _ in range(self.max_num)]

        self.max_map = defaultdict(int)

        self.sieve()



    def rep_sqr(self, base, k):

        # 繰り返し二乗法

        if k == 0:

            return 1

        elif k % 2 == 0:

            return (self.rep_sqr(base, k / 2) ** 2) % self.p

        else:

            return (self.rep_sqr(base, k - 1) * base) % self.p



    def sieve(self):

        """

        エラトステネスの篩　O(n)

        nまでに含まれる素数を導出

        """

        self.prime[0], self.prime[1] = 1, 1

        for i in range(2, self.max_num):

            if self.prime[i] == 0:

                for j in range(i * 2, self.max_num, i):

                    if self.prime[j] == 0:

                        self.prime[j] = i

                self.prime[i] = i



    def lcm_list_mod(self, arr):

        """

        listのそれぞれの要素について、素因数分解する

        それぞれの因数について最大であれば更新する

        """

        for i in range(len(arr)):

            num = arr[i]

            d = defaultdict(int)



            while num > 1:

                fact = self.prime[num]

                d[fact] += 1

                num //= fact



            for i in list(d.keys()):

                self.max_map[i] = max(self.max_map[i], d[i])



        ans = 1

        for i in list(self.max_map.keys()):

            ans = (ans * self.rep_sqr(i, self.max_map[i])) % self.p

        return ans





def rep_sqr(base, k, mod):

    if k == 0:

        return 1

    elif k % 2 == 0:

        return (rep_sqr(base, k / 2, mod) ** 2) % mod

    else:

        return (rep_sqr(base, k - 1, mod) * base) % mod



# a^(-1) == a^(m-2)



def flt(a, mod):

    return rep_sqr(a, mod-2, mod)



n = int(eval(input()))

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

MOD = 10**9+7



lcm_mod = LCM_mod(max(a), MOD)

lcm_all = lcm_mod.lcm_list_mod(a)



b = list([lcm_all * flt(x, MOD) for x in a])

ans = 0

for i in range(len(b)):

    ans += b[i]

    ans %= MOD

print(ans)

from collections import defaultdict


class LCM_mod:
    """
    最小公倍数の計算を行う
    オーバーフローが発生しないように素因数分解し,
    因数の積を逐次余りに置き換えて最小公倍数を導出する.
    """

    def __init__(self, max_num, p=10**9 + 7):
        self.max_num = max_num + 1
        self.p = p
        self.prime = [0 for _ in range(self.max_num)]
        self.max_map = defaultdict(int)
        self.sieve()

    def rep_sqr(self, base, k):
        # 繰り返し二乗法
        if k == 0:
            return 1
        elif k % 2 == 0:
            return (self.rep_sqr(base, k / 2) ** 2) % self.p
        else:
            return (self.rep_sqr(base, k - 1) * base) % self.p

    def sieve(self):
        """
        エラトステネスの篩　O(n)
        nまでに含まれる素数を導出
        """
        self.prime[0], self.prime[1] = 1, 1
        for i in range(2, self.max_num):
            if self.prime[i]:
                continue
            for j in range(i * 2, self.max_num, i):
                if self.prime[j]:
                    continue
                self.prime[j] = i
            self.prime[i] = i

    def lcm_list_mod(self, arr):
        """
        listのそれぞれの要素について、素因数分解する
        それぞれの因数について最大であれば更新する
        """
        for i in range(len(arr)):
            num = arr[i]
            d = defaultdict(int)
            while num > 1:
                fact = self.prime[num]
                d[fact] += 1
                num //= fact
            for i in list(d.keys()):
                self.max_map[i] = max(self.max_map[i], d[i])
        ans = 1
        for i in list(self.max_map.keys()):
            ans = (ans * self.rep_sqr(i, self.max_map[i])) % self.p
        return ans


def rep_sqr(base, k, mod):
    if k == 0:
        return 1
    elif k % 2 == 0:
        return (rep_sqr(base, k / 2, mod) ** 2) % mod
    else:
        return (rep_sqr(base, k - 1, mod) * base) % mod


# a^(-1) == a^(m-2)
def flt(a, mod):
    return rep_sqr(a, mod - 2, mod)


n = int(eval(input()))
a = list(map(int, input().split()))
MOD = 10**9 + 7
lcm_mod = LCM_mod(max(a), MOD)
lcm_all = lcm_mod.lcm_list_mod(a)
b = list([lcm_all * flt(x, MOD) for x in a])
ans = 0
for i in range(len(b)):
    ans += b[i]
    ans %= MOD
print(ans)

from collections import defaultdict


class LCM_mod:
    """
    最小公倍数の計算を行う
    オーバーフローが発生しないように素因数分解し,
    因数の積を逐次余りに置き換えて最小公倍数を導出する.
    """

    def __init__(self, max_num, p=10**9 + 7):
        self.max_num = max_num + 1
        self.p = p
        self.prime = [0 for _ in range(self.max_num)]
        self.max_map = defaultdict(int)
        self.sieve()

    def rep_sqr(self, base, k):
        # 繰り返し二乗法
        if k == 0:
            return 1
        elif k % 2 == 0:
            return (self.rep_sqr(base, k / 2) ** 2) % self.p
        else:
            return (self.rep_sqr(base, k - 1) * base) % self.p

    def sieve(self):
        """
        エラトステネスの篩　O(n)
        nまでに含まれる素数を導出
        """
        self.prime[0], self.prime[1] = 1, 1
        for i in range(2, self.max_num):
            if self.prime[i] == 0:
                for j in range(i * 2, self.max_num, i):
                    if self.prime[j] == 0:
                        self.prime[j] = i
                self.prime[i] = i

    def lcm_list_mod(self, arr):
        """
        listのそれぞれの要素について、素因数分解する
        それぞれの因数について最大であれば更新する
        """
        for i in range(len(arr)):
            num = arr[i]
            d = defaultdict(int)
            while num > 1:
                fact = self.prime[num]
                d[fact] += 1
                num //= fact
            for i in list(d.keys()):
                self.max_map[i] = max(self.max_map[i], d[i])
        ans = 1
        for i in list(self.max_map.keys()):
            ans = (ans * self.rep_sqr(i, self.max_map[i])) % self.p
        return ans


def rep_sqr(base, k, mod):
    if k == 0:
        return 1
    elif k % 2 == 0:
        return (rep_sqr(base, k / 2, mod) ** 2) % mod
    else:
        return (rep_sqr(base, k - 1, mod) * base) % mod


# a^(-1) == a^(m-2)
def flt(a, mod):
    return rep_sqr(a, mod - 2, mod)


n = int(eval(input()))
a = list(map(int, input().split()))
MOD = 10**9 + 7
lcm_mod = LCM_mod(max(a), MOD)
lcm_all = lcm_mod.lcm_list_mod(a)
b = list([lcm_all * flt(x, MOD) for x in a])
ans = 0
for i in range(len(b)):
    ans += b[i]
    ans %= MOD
print(ans)

-            if self.prime[i]: -                continue -            for j in range(i * 2, self.max_num, i): -                if self.prime[j]: -                    continue -                self.prime[j] = i -            self.prime[i] = i +            if self.prime[i] == 0: +                for j in range(i * 2, self.max_num, i): +                    if self.prime[j] == 0: +                        self.prime[j] = i +                self.prime[i] = i