import core.bitop, std.algorithm, std.ascii, std.bigint, std.conv,
    std.functional, std.math, std.numeric, std.range, std.stdio, std.string,
    std.random, std.typecons, std.container;

ulong MAX = 1_000_100, MOD = 1_000_000_007, INF = 1_000_000_000_000;
alias sread = () => readln.chomp();
alias lread(T = long) = () => readln.chomp.to!(T);
alias aryread(T = long) = () => readln.split.to!(T[]);
alias Pair = Tuple!(long, "begin", long, "end");
alias PQueue(T, alias less = "a<b") = BinaryHeap!(Array!T, less);

// 累積二乗法
long power_mod(long a, long n, long mod = MOD)
{
    long ret = 1;
    while (n)
    {
        if (n % 2)
        {
            ret *= a;
            ret %= mod;
        }
        a^^=2;
        a %= mod;
        n >>= 1;
    }
    return ret % mod;
}

long fermat_inv(long a, long mod = MOD)
{
    return a.power_mod(mod - 2);
}

auto lcm_mod(T)(T[] ary, T limit = MAX, long mod = MOD)
{
    // 素因数の形で保持
    auto lcm_table = new T[](limit + 1);
    auto minFactor = new long[](limit + 1);
    // 素因数分解には minFactor[i] = iに含まれる最小の素因数 とする配列を利用
    // この配列はエラトステネスの篩を使うことで高速に求められる
    // minFactorの設定
    {
        auto isPrime = new bool[](limit + 1);
        isPrime[] = true;
        isPrime[0] = isPrime[1] = false;
        foreach (i; iota(2, limit + 1))
        {
            if (isPrime[i])
            {
                foreach (j; iota(i, limit + 1, i))
                {
                    if (isPrime[j])
                    {
                        minFactor[j] = i;
                        isPrime[j] = false;
                    }
                }
            }
        }
    }
    // minFactor[]を利用した素因数分解とlcm_tableの設定
    foreach (e; ary)
    {
        long[long] prime_factor;
        while (minFactor[e])
        {
            if (minFactor[e] in prime_factor)
                prime_factor[minFactor[e]]++;
            else
                prime_factor[minFactor[e]] = 1;

            e /= minFactor[e];
        }
        foreach (key, value; prime_factor)
            lcm_table[key] = max(value, lcm_table[key]);
    }
    // lcmの計算(mod)
    long ret = 1;
    foreach (i, e; lcm_table)
    {
        if (e)
        {
            ret *= power_mod(i, e);
            ret %= mod;
        }
    }
    return ret;
}

void main()
{
    auto n = lread();
    auto a = aryread();
    // lcmのmodをなんとか計算したい
    auto lcm = a.lcm_mod();
    long ans;
    foreach (i; iota(n))
    {
        auto a_inv = a[i].fermat_inv();
        ans += lcm * a_inv % MOD;
        ans %= MOD;
    }
    writeln(ans % MOD);
}

void scan(TList...)(ref TList Args)
{
    auto line = readln.split();
    foreach (i, T; TList)
    {
        T val = line[i].to!(T);
        Args[i] = val;
    }
}
