#include <bits/stdc++.h>
using namespace std;

using ll = long long;

constexpr ll MOD = 1e9+7;
constexpr ll INF = 1ll<<60;

#define FOR(i,a,b) for (ll i=(a);i<(ll)(b);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()

template<int mod> struct Fp {
    long long val;
    constexpr Fp(long long v = 0) noexcept : val(v % mod) {
        if (val < 0) val += mod;
    }
    constexpr int getmod() { return mod; }
    constexpr Fp operator - () const noexcept {
        return val ? mod - val : 0;
    }
    constexpr Fp operator + (const Fp& r) const noexcept { return Fp(*this) += r; }
    constexpr Fp operator - (const Fp& r) const noexcept { return Fp(*this) -= r; }
    constexpr Fp operator * (const Fp& r) const noexcept { return Fp(*this) *= r; }
    constexpr Fp operator / (const Fp& r) const noexcept { return Fp(*this) /= r; }
    constexpr Fp& operator += (const Fp& r) noexcept {
        val += r.val;
        if (val >= mod) val -= mod;
        return *this;
    }
    constexpr Fp& operator -= (const Fp& r) noexcept {
        val -= r.val;
        if (val < 0) val += mod;
        return *this;
    }
    constexpr Fp& operator *= (const Fp& r) noexcept {
        val = val * r.val % mod;
        return *this;
    }
    constexpr Fp& operator /= (const Fp& r) noexcept {
        long long a = r.val, b = mod, u = 1, v = 0;
        while (b) {
            long long t = a / b;
            a -= t * b; swap(a, b);
            u -= t * v; swap(u, v);
        }
        val = val * u % mod;
        if (val < 0) val += mod;
        return *this;
    }
    constexpr bool operator == (const Fp& r) const noexcept {
        return this->val == r.val;
    }
    constexpr bool operator != (const Fp& r) const noexcept {
        return this->val != r.val;
    }
    friend constexpr ostream& operator << (ostream &os, const Fp<mod>& x) noexcept {
        return os << x.val;
    }
    friend constexpr Fp<mod> modpow(const Fp<mod> &a, long long n) noexcept {
        if (n == 0) return 1;
        auto t = modpow(a, n / 2);
        t = t * t;
        if (n & 1) t = t * a;
        return t;
    }
	friend constexpr Fp<mod> modfac(long long l, long long r) noexcept
	{
		auto res = Fp<mod>(1);
		for (Fp<mod> i = l; i < r; ++i) res *= i;
		return res;
	}
};
using mint = Fp<1000000007>;


struct Eratos
{
	vector<long long> primes;
	vector<bool> isprime;
	vector<long long> min_factor;
 
	Eratos(long long MAX) : primes(),
							isprime(MAX+1, true),
							min_factor(MAX+1, -1)
	{
		isprime[0] = isprime[1] = false;
		min_factor[0] = 0;
		min_factor[1] = 1;
 
		for (long long i = 2; i <= MAX; ++i)
		{
			if(!isprime[i]) continue;
			primes.push_back(i);
			min_factor[i] = i;
			for (long long j = i*2; j <= MAX; j += i)
			{
				isprime[j] = false;
				if (min_factor[j] == -1) min_factor[j] = i;
			}
		}
	}
 
	vector<pair<long long, long long>> prime_factorize(long long n)
	{
		vector<pair<long long, long long>> res;
		while (n != 1)
		{
			long long prime = min_factor[n];
			long long exp = 0;
			while (min_factor[n] == prime)
			{
				++exp;
				n /= prime;
			}
			res.push_back(make_pair(prime, exp));
		}
		return res;
	}
};


int main(int argc, char **argv)
{
	ll N; cin >> N;
	vector<ll> A(N); REP(i, N) cin >> A[i];

	vector<ll> p(1000100);
	Eratos e(1000100);
	REP(i, N)
	{
		auto pv = e.prime_factorize(A[i]);
		for (auto &e : pv)
		{
			p[e.first] = max(p[e.first], e.second);
		}
	}

	mint l{1};
	for (ll i = 2; i < 1000100; ++i)
	{
		l *= modpow(mint(i), p[i]);
	}

	mint res{0};
	REP(i, N)
	{
		res += l/A[i];
	}

	std::cout << res << std::endl;
}


Measured memory_bytes: 17272