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

namespace ClassLibrary1
{
    public class ListNode
    {
        public int val;
        public ListNode next;
        public ListNode(int x) { val = x; }
    }


    public class Class1
    {
        static Dictionary<Tuple<long, long>, long> dic = new Dictionary<Tuple<long, long>, long>();

        static long mod = 1000000007;
        static long[] factorial = new long[100001];
        static long[] invFactorial = new long[100001];

        private static void calcFanctorial(long N)
        {
            factorial[0] = 1;
            for(int i=1; i< N+1; i++)
            {
                factorial[i] = factorial[i - 1] * i;
                factorial[i] %= mod;
            }
            invFactorial[N] = inv(factorial[N]);
            for (int i = (int)N; i > 0; i--)
            {
                invFactorial[i - 1] = invFactorial[i] * i % mod;
            }

        }

        static void Main(string[] args)
        {


            var N = ReadLong();
            var AA = ReadLongArr();
            //calcFanctorial(N + 1);

            long lcm = 1;
            long gcd = long.MaxValue;
            List<long> vect = new List<long>();
            for (int i = 0; i < N; i++)
            {
                var factor = AA[i] / GcdVector(vect, AA[i]);
                vect.Add(factor);
                lcm = lcm * factor % mod;
            }
/*
            for (int i=0; i<N; i++)
            {
                lcm = Lcm(lcm, AA[i], gcd);
                lcm %= mod;
            }
            */
            long res = 0;
            for (int i = 0; i < N; i++)
            {
                res += lcm * inv(AA[i]) % mod;
                res %= mod;
            }

            Console.WriteLine(res);

        }

        private static long nCm(long n, long m)
        {
            if (n < m) return 0;

             return (factorial[n] * invFactorial[m] % mod) * invFactorial[n-m] % mod;
        }

        public static long pow(long a, long b, long mod)
        {
            a %= mod;

            if (b <= 0) return 1;
            var t = pow(a, b / 2, mod);
            if ((b & 1) == 0) return t * t % mod;
            return t * t % mod * a % mod;
        }

        public static long Lcm(long a, long b)
        {
            return a * b % mod * inv(Gcd(a, b)) % mod;
        }

        static long GcdVector(List<long> a, long b)
        {
            long ma = 1;
            for (int i = 0; i < a.Count; i++)
                ma = ma * a[i] % b;
            return Gcd(b, ma);
        }

        public static long Gcd(long a, long b)
        {
            if (a < b)
                // 引数を入替えて自分を呼び出す
                return Gcd(b, a);
            while (b != 0)
            {
                var remainder = a % b;
                a = b;
                b = remainder;
            }
            return a;
        }

        public static long pow(long a, long b) => pow(a, b, mod);
        public static long inv(long a) => pow(a, mod - 2);


        private static string ReadString()
        {
            return Console.ReadLine();
        }
        private static string[] ReadStringArr()
        {
            return Console.ReadLine().Split(' ');
        }
        private static long ReadLong()
        {
            return long.Parse(Console.ReadLine());
        }
        private static long[] ReadLongArr()
        {
            string[] s = ReadStringArr();
            long[] l = new long[s.Length];
            for(int i=0; i<l.Length; i++)
            {
                l[i] = long.Parse(s[i]);
            }

            return l;
        }
    }

}


Measured memory_bytes: 13536