#include "bits/stdc++.h"
using namespace std;
typedef long long ll;

template <typename TYPE>
void print_vec(const vector<TYPE>& v){
	for(int i=0; i<v.size(); i++){
		cout << v[i] << " ";
	}
	cout << endl;
}

template <typename TYPE>
void print_vec2(const vector<vector<TYPE>>& v){
  cout << endl; cout << "       ";
  for(int i=0; i<v[0].size(); i++) cout << i << "   "; 
  cout << endl;
	for(int i=0; i<v.size(); i++){
		cout << "i=" << i << ":   ";
		for(int j=0; j<v[i].size(); j++){
			if(v[i][j] == 0) cout << "\x1B[0m" << v[i][j] << "   ";
      else cout << "\x1B[31m" << v[i][j] << "   ";//https://stackoverrun.com/ja/q/12618775
		}
		cout << "\x1B[0m" << endl;
	}
}
 


// auto mod int
// https://youtu.be/L8grWxBlIZ4?t=9858
// https://youtu.be/ERZuLAxZffQ?t=4807 : optimize
// https://youtu.be/8uowVvQ_-Mo?t=1329 : division
const int mod = 1000000007;
//const int mod = 998244353;
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 { return mint(*this) += a;}
  mint operator-(const mint a) const { return mint(*this) -= a;}
  mint operator*(const mint a) const { return mint(*this) *= 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 { return mint(*this) /= a;}
};
istream& operator>>(istream& is, mint& a) { return is >> a.x;}
ostream& operator<<(ostream& os, const mint& a) { return os << a.x;}


// ll gcd(ll a, ll b){//greatest common divider 最大公約数を求める
//   if(b==0) return a;
//   return gcd(b, a%b);
// }

// ll lcm(ll a, ll b){//least common multiple 最小公倍数を求める
//   return a*b/gcd(a, b);
// }

int main(){
	int N;
	cin >> N;
	vector<ll> A(N);
	for(int i=0; i<N; i++) cin >> A[i];

	// ll lcm_a = 1;
	// for(int i=0; i<N; i++){
	// 	lcm_a = lcm(lcm_a, A[i]);
	// }

	//エラトステネスの篩
	
	// vector<P> prime_factors;
	map<ll, int> prime_factors;
	vector<ll> B = A;
	for(int i=0; i<N; i++){
		for(ll j=2; j*j <= B[i]; j++){
			if(B[i]%j != 0) continue;
			int num = 0;
			while(B[i]%j == 0){
				B[i] /= j;
				num++;
			}
			prime_factors[j] = max(prime_factors[j], num);
		}
		if(B[i] != 1) prime_factors[B[i]] = max(prime_factors[B[i]], 1);
	}
	
	mint lcm_a(1);
	typedef pair<ll, int> P;
	//map<key, value>のイテレータを参照剥がしして得られる型は.
	// std::pair<const key, value>である.
	// 言い換えるとmap<key, value>のvalue_typeはpair<const key, value>である.
	//https://qiita.com/_EnumHack/items/f462042ec99a31881a81
	for(P prime : prime_factors){
		mint x(prime.first);//.pow(prime.second);
		mint y = x.pow(prime.second);
		lcm_a *= y;
		//cout << " prime: " << prime.first << " num: " << prime.second << " lcm_a: " << lcm_a << endl;
	}

	mint ans(0);
	for(int i=0; i<N; i++){
		ans += lcm_a / A[i];
	}
	cout << ans.x << endl;

}


Measured memory_bytes: 4360