#include <iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<map>
#include<set>
#include<stack>
#include<queue>
#include<math.h>
using namespace std;
typedef long long ll;
#define int long long
typedef vector<int> VI;
typedef pair<int, int> P;
typedef priority_queue<int> PQ;
template<class T>bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; }
#define fore(i,a) for(auto &i:a)
#define REP(i,n) for(int i=0;i<n;i++)
#define eREP(i,n) for(int i=0;i<=n;i++)
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define eFOR(i,a,b) for(int i=(a);i<=(b);++i)
#define SORT(c) sort((c).begin(),(c).end())
#define rSORT(c) sort((c).rbegin(),(c).rend())
#define LB(x,a) lower_bound((x).begin(),(x).end(),(a))
#define UB(x,a) upper_bound((x).begin(),(x).end(),(a))
#define INF 1000000000
#define LLINF 9223372036854775807
#define mod 1000000007
//vector<vector<int> > dp;
//vector<vector<vector<int> > > vvvi;
//dp=vector<vector<int> >(N, vector<int>(M,0));
//vector<pair<int,int> > v;
//v.push_back(make_pair(x,y));
//priority_queue<int,vector<int>, greater<int> > q2;



struct mint {
	ll x; // typedef long long ll;
	mint(ll x = 0) :x((x%mod + mod) % mod) {}
	mint operator-() const { return mint(-x); }
	mint& operator+=(const mint a) {
		if ((x += a.x) >= mod) x -= mod;
		return *this;
	}
	mint& operator-=(const mint a) {
		if ((x += mod - a.x) >= mod) x -= mod;
		return *this;
	}
	mint& operator*=(const mint a) {
		(x *= a.x) %= mod;
		return *this;
	}
	mint operator+(const mint a) const {
		mint res(*this);
		return res += a;
	}
	mint operator-(const mint a) const {
		mint res(*this);
		return res -= a;
	}
	mint operator*(const mint a) const {
		mint res(*this);
		return res *= a;
	}
	mint pow(ll t) const {
		if (!t) return 1;
		mint a = pow(t >> 1);
		a *= a;
		if (t & 1) a *= *this;
		return a;
	}

	// for prime mod
	mint inv() const {
		return pow(mod - 2);
	}
	mint& operator/=(const mint a) {
		return (*this) *= a.inv();
	}
	mint operator/(const mint a) const {
		mint res(*this);
		return res /= a;
	}
};
mint mpow(ll x, ll n) {
	mint res(1), e(x);
	while (n) {
		if (n & 1)res *= e;
		e *= e;
		n >>= 1;
	}
	return res;
}
struct Sieve{
  int n;
  vector<int> f, primes;
  Sieve(int n = 1) :n(n), f(n + 1) {
	f[0] = f[1] = -1;
	for (ll i = 2; i <= n; ++i) {
	  if (f[i]) continue;
	  primes.push_back(i);
	  f[i] = i;
	  for (ll j = i * i; j <= n; j += i) {
		if (!f[j]) f[j] = i;
	  }
	}
  }
  bool isPrime(int x) { return f[x] == x; }
  vector<int> factorList(int x) {
	vector<int> res;
	while (x != 1) {
	  res.push_back(f[x]);
	  x /= f[x];
	}
	return res;
  }
  vector<P> factor(int x) {
	vector<int> fl = factorList(x);
	if (fl.size() == 0) return {};
	vector<P> res(1, P(fl[0], 0));
	for (int p : fl) {
	  if (res.back().first == p) {
		res.back().second++;
	  }
 else {
res.emplace_back(p, 1);
}
}
return res;
}
};
signed main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	Sieve sieve(1e6);
	int N;
	cin >> N;
	VI A(N);

	REP(i, N)cin >> A[i];

	map<int, int>mp;
	
	REP(i, N) {
		auto f = sieve.factor(A[i]);
		for (auto p : f) {
			mp[p.first] = max(mp[p.first], p.second);
		}
	}

	mint lcm = 1;
	for (auto p : mp) {
		lcm *= mpow(p.first, p.second);
	}
	mint ans = 0;
	REP(k, N) {
		ans += lcm / A[k];
		//ans %= mod;
	}


	cout << ans.x << endl;



	return 0;
}



Measured memory_bytes: 9460