using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using static Common;
using static Constans;

public static class Constans
{
    public const long Mod = (long)1e9 + 7;
}

public struct ModInt
{
    public long Num;

    public ModInt(long num)
    {
        Num = num;
    }

    // x^n
    public static long Power(long x, long n)
    {
        long pow = 1;
        while (n > 0)
        {
            if (n % 2 == 0)
            {
                x *= x;
                x %= Mod;
                n /= 2;
            }
            else
            {
                pow *= x;
                pow %= Mod;
                n--;
            }
        }

        return pow;
    }

    public static ModInt GetInv(long f)
    {
        // フェルマーの小定理 a^(-1) = a^(mod-2)
        return new ModInt(Power(f, Mod - 2));
    }

    public ModInt GetInv()
    {
        return GetInv(Num);
    }

    public override string ToString()
    {
        return Num.ToString();
    }

    public static ModInt operator +(ModInt l, ModInt r)
    {
        l.Num += r.Num;
        if (l.Num >= Mod)
        {
            l.Num -= Mod;
        }
        return l;
    }

    public static ModInt operator -(ModInt l, ModInt r)
    {
        l.Num -= r.Num;
        if (l.Num < 0)
        {
            l.Num += Mod;
        }
        return l;
    }

    public static ModInt operator *(ModInt l, ModInt r)
    {
        return new ModInt(l.Num * r.Num % Mod);
    }

    public static ModInt operator /(ModInt l, ModInt r)
    {
        return l * r.GetInv();
    }

    public static implicit operator ModInt(long n)
    {
        n %= Mod;
        if (n < 0)
        {
            n += Mod;
        }
        return new ModInt(n);
    }
}

public class Prime
{
    BitArray Sieve;
    // Sieve of Eratosthenes
    public void Init(int max)
    {
        Sieve = new BitArray(max + 1);
        var end = (int)(Math.Sqrt(max) + 0.1);
        Sieve.Set(1, true);
        for (int i = 2; i <= end; i++)
        {
            if (!Sieve.Get(i))
            {
                for (int j = i * 2; j <= max; j += i)
                {
                    Sieve.Set(j, true);
                }
            }
        }
    }

    public bool IsPrime(int n)
    {
        return !Sieve.Get(n);
    }

    public int[] GetPrimes(int n)
    {
        return Enumerable.Range(2, n - 1).Where(i => !Sieve.Get(i)).ToArray();
    }
}

public static class PrimeFactorize
{
    static List<int> Factorize(int n, IEnumerable<int> primes)
    {
        var factor = new List<int>();
        foreach (var p in primes)
        {
            while (n % p == 0)
            {
                factor.Add(p);
                n /= p;
            }
        }
        if (n > 1)
        {
            factor.Add(n);
        }
        return factor;
    }

    static Dictionary<int, int> FactorToDict(IEnumerable<int> factor)
    {
        var dict = new Dictionary<int, int>();

        foreach (var f in factor)
        {
            if (!dict.ContainsKey(f))
            {
                dict[f] = 0;
            }
            dict[f]++;
        }

        return dict;
    }

    public static void Init(int n)
    {
        prime = new Prime();
        var max = (int)(Math.Sqrt(n) + 1);
        prime.Init(max);
    }

    static Prime prime;
    // 要素を各個数で表す
    public static Dictionary<int, int> Factorize(int n)
    {
        var max = (int)(Math.Sqrt(n) + 1);
        var primes = prime.GetPrimes(max);
        return FactorToDict(Factorize(n, primes));
    }
}

public static class Common
{
    public static Dictionary<int, int> LCM(Dictionary<int, int> m, Dictionary<int, int> n)
    {
        var lcm = m.ToDictionary(x => x.Key, x => x.Value);
        foreach (var key in n.Keys)
        {
            if (lcm.ContainsKey(key))
            {
                var max = Math.Max(lcm[key], n[key]);
                lcm[key] = max;
            }
            else
            {
                lcm[key] = n[key];
            }
        }

        return lcm;
    }

    public static Dictionary<int, int> Div(Dictionary<int, int> m, Dictionary<int, int> n)
    {
        var result = m.ToDictionary(x => x.Key, x => x.Value);
        foreach (var nf in n)
        {
            result[nf.Key] -= nf.Value;
            if (result[nf.Key] == 0)
            {
                result.Remove(nf.Key);
            }
        }
        return result;
    }
    public static ModInt GetModint(Dictionary<int, int> m)
    {
        var i = new ModInt(1);
        foreach (var mf in m)
        {
            i *= ModInt.Power(mf.Key, mf.Value);
        }
        return i;
    }
}

public class Solution
{
    public static void Main()
    {
        var N = int.Parse(Console.ReadLine());
        var A = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();

        PrimeFactorize.Init(A.Max());
        var af = A.Select(a => PrimeFactorize.Factorize(a)).ToArray();
        var lcmf = new Dictionary<int, int>();
        foreach (var a in af)
        {
            foreach (var key in a.Keys)
            {
                if (lcmf.ContainsKey(key))
                {
                    var max = Math.Max(lcmf[key], a[key]);
                    lcmf[key] = max;
                }
                else
                {
                    lcmf[key] = a[key];
                }
            }
        }

        ModInt lcm = 1;
        foreach (var l in lcmf)
        {
            lcm *= ModInt.Power(l.Key, l.Value);
        }

        ModInt sum = 0;
        foreach (var a in A)
        {
            var b = lcm / a;
            sum += b;
        }

        Console.WriteLine(sum);
    }
}

Measured memory_bytes: 23760