using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ABC152_E
{
    class Program
    {
        static void Main(string[] args)
        {
            var n = int.Parse(Console.ReadLine());
            var a = Console.ReadLine().Split().Select(int.Parse).ToArray();

            var val = new Dictionary<ModInt, ModInt>();
            foreach (var i in a)
            {
                var primes = PrimeFactors(i);

                foreach (var p in primes)
                {
                    var key = p.Key;
                    if (val.ContainsKey(key))
                    {
                        val[p.Key] = Math.Max(val[key], p.Value);
                    }
                    else
                    {
                        val.Add(key, p.Value);
                    }
                }
            }

            ModInt num = 1;
            foreach (var i in val)
            {
                num *= (ModInt)Math.Pow(i.Key, i.Value);
            }

            ModInt sum = 0;
            foreach (var i in a)
            {
                sum += num / i;
            }

            Console.WriteLine(sum);
        }

        public static Dictionary<int, int> PrimeFactors(int n)
        {
            int i = 2;
            int tmp = n;
            var ret = new Dictionary<int, int>();

            while (i * i <= n) //※1
            {
                if (tmp % i == 0)
                {
                    tmp /= i;
                    if (ret.ContainsKey(i))
                    {
                        ret[i]++;
                    }
                    else
                    {
                        ret.Add(i, 1);
                    }
                }
                else
                {
                    i++;
                }
            }

            if (tmp != 1)
            {
                if (ret.ContainsKey(tmp))
                {
                    ret[tmp]++;
                }
                else
                {
                    ret.Add(tmp, 1);
                }
            }

            return ret;
        }
    }

    struct ModInt
    {
        const int MOD = 1000000007;
        long Data;
        public ModInt(long data) { if ((Data = data % MOD) < 0) Data += MOD; }
        public static implicit operator long(ModInt modInt) => modInt.Data;
        public static implicit operator ModInt(long val) => new ModInt(val);
        public static ModInt operator +(ModInt a, ModInt b)
        {
            long res = a.Data + b.Data;
            return new ModInt() { Data = res >= MOD ? res - MOD : res };
        }
        public static ModInt operator +(ModInt a, long b) => a.Data + b;
        public static ModInt operator -(ModInt a, ModInt b)
        {
            long res = a.Data - b.Data;
            return new ModInt() { Data = res < 0 ? res + MOD : res };
        }
        public static ModInt operator -(ModInt a, long b) => a.Data - b;
        public static ModInt operator *(ModInt a, ModInt b) => new ModInt() { Data = a.Data * b.Data % MOD };
        public static ModInt operator /(ModInt a, ModInt b) => a.Data * GetInverse(b);

        public override string ToString() => Data.ToString();

        static long GetInverse(long a)
        {
            long div;
            long p = MOD;
            long x1 = 1, y1 = 0, x2 = 0, y2 = 1;
            while (true)
            {
                if (p == 1) return x2;
                div = a / p;
                x1 -= x2 * div;
                y1 -= y2 * div;
                a %= p;
                if (a == 1) return x1;
                div = p / a;
                x2 -= x1 * div;
                y2 -= y1 * div;
                p %= a;
            }
        }
    }
}


Measured memory_bytes: 20700