#include <iostream>
#include <vector>
#include <array>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <string>
#include <sstream>
#include <algorithm>
#include <random>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <cmath>
#include <cassert>
#include <climits>
#include <bitset>
#include <functional>
#include <iomanip>
#include <random>


#define FOR_LT(i, beg, end) for (int i = beg; i < end; i++)
#define FOR_LE(i, beg, end) for (int i = beg; i <= end; i++)
#define FOR_DW(i, beg, end) for (int i = beg; end <= i; i--)

using namespace std;

template<int64_t M = 1000000007>
class ModInt {
public:
	ModInt() : val_(0) {};

	ModInt(int64_t val) {
		this->val_ = val;
		this->val_ %= M;
		if (this->val_ < M) this->val_ += M;
	}

	operator int64_t() const {
		return this->val_;
	}

	ModInt& operator += (int64_t val) {
		this->val_ = val;
		this->val_ %= M;
		if (this->val_ < M) this->val_ += M;

		return *this;
	}

	ModInt& operator -= (int64_t val) {
		this->val_ -= val;
		this->val_ %= M;
		if (this->val_ < 0) this->val_ += M;

		return *this;
	}

	ModInt& operator *= (int64_t val) {
		this->val_ *= val;
		this->val_ %= M;

		return *this;
	}

	ModInt& operator /= (int64_t val) {
		ModInt v = ModInt(val).pow(M - 2);
		*this *= v;

		return *this;
	}

	ModInt operator + (int64_t v) const {
		ModInt ret = *this;
		return (ret += v);
	}

	ModInt operator - (int64_t v) const {
		ModInt ret = *this;
		return (ret -= v);
	}

	ModInt operator * (int64_t v) const {
		ModInt ret = *this;
		return (ret *= v);
	}

	ModInt operator / (int64_t v) const {
		ModInt ret = *this;
		return (ret /= v);
	}

	ModInt pow(int64_t m) const {
		if (m == 0) {
			ModInt ret(1);
			return ret;
		}
		if (m == 1) {
			ModInt ret(*this);
			return ret;
		}

		ModInt v = this->pow(m / 2);
		ModInt ret = v * v;
		if (m & 1) {
			ret *= (*this);
		}
		return ret;
	}

	ostream& operator << (ostream & out) {
		out << this->val_;
		return out;
	}

private:
	int64_t val_;
};


// sqrt(n) までの素数を求める。 まで対応
void create_primes(int64_t n, bitset<1000001>& primes) {
	primes.flip();

	int64_t u_b = sqrt(n + 1);
	assert(u_b < 1000002);

	{
		for (int64_t j = 4; j <= u_b; j += 2) {
			primes.reset(j);
		}
	}
	for (int64_t i = 3; i <= u_b; i += 2) {
		if (!primes.test(i)) continue;

		for (int64_t j = i * 2; j <= u_b; j += i) {
			primes.reset(j);
		}
	}
}

struct FactorInfo {
	int64_t v;
	int64_t c;
};

// n の素因数分解を行う。 
bitset<1000001> primes;
vector<FactorInfo> make_factors(int64_t n)
{
	int64_t v = n;
	int64_t limit = sqrt(n + 1);

	vector<FactorInfo> ans;
	FOR_LE(i, 2, limit) {
		if (!primes.test(i)) continue;

		int64_t count = 0;
		while (v % i == 0) {
			v /= i;
			count++;
		}

		if (count != 0) {
			ans.push_back({ i, count });
		}
	}

	if (v != 1) {
		ans.push_back({ v , 1 });
	}

	return ans;
}

/*
template<int64_t M>
ModInt<M> gcd(ModInt<M> a, ModInt<M> b) {
	if (a < b) swap(a, b);
	if (a % b == 0) return b;
	return gcd(b, a % b);
}

int64_t lcm(int64_t a, int64_t b)
{
	int64_t gcdval = gcd(a, b);

	return (a * b) / gcdval;
}
*/

static const int64_t kRem = 1000000007;

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout << fixed << setprecision(20);

	int n; cin >> n;

	vector<int64_t> as(n);
	FOR_LT(i, 0, n) {
		int64_t v; cin >> v;
		as[i] = v;
	}

	vector<vector<FactorInfo>> fs(n);
	create_primes(n + 1, primes);
	FOR_LT(i, 0, n) {
		fs[i] = make_factors(as[i]);
	}

	unordered_map<int64_t, int64_t> factors;
	FOR_LT(i, 0, n) {
		for (auto& f : fs[i]) {
			if (factors.find(f.v) == factors.end()) {
				factors[f.v] = f.c;
			}
			else {
				factors[f.v] = max(f.c, factors[f.v]);
			}
		}
	}

	ModInt<kRem> val(1);
	for (auto& f : factors) {
		ModInt<kRem> cur(f.first);
		cur = cur.pow(f.second);
		val *= cur;
	}

	int64_t ans = 0;
	FOR_LT(i, 0, n) {
		ans += (val / as[i]) % kRem;
		ans %= kRem;
	}

	cout << ans << endl;

	return 0;
}

Measured memory_bytes: 2048