#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll,ll> mp;
typedef pair<ll,mp> mypair;
#define MAXN 1001024
#define INF 1000000007
int gcd(int a,int b){
	if(b==0)return a;
	else return gcd(b,a%b);
}
ll extgcd(ll a,ll b,ll &x,ll &y){
	if(b==0){
		x=1;
		y=0;
		return a;
	}
	ll d = extgcd(b,a%b,y,x);
	y -= a/b * x;
	return d;
}
//ax+by = c
mypair extgcd(ll a,ll b){
  ll x,y;
  ll d = extgcd(a,b,x,y);
  mp tmp = mp(x,y);
  return mypair(d,tmp);
}

//素数列挙
ll prime[MAXN] ;
bool is_prime[MAXN];
int sieve(int n){
	int res = 0;
	fill(is_prime,is_prime+MAXN,true);
	is_prime[0] = is_prime[1] = false;
	for(int i = 2;i<=n;i++){
		if(!is_prime[i])continue;
		prime[res++] = i;
		for(int j = 2*i;j<=n;j+=i)is_prime[j] = false;
	}
	return res;	
}
bool is_prime_ab[MAXN]; //segment_sieveの場合 [a,b) x(x>a)が素数かどうかはis_prime_ab[x-a]になる。
ll segment_sieve(ll a,ll b){
	fill(is_prime,is_prime+MAXN,true);
	fill(is_prime_ab,is_prime_ab+MAXN,true);
	for(int i=2;i*i <= b-1 ;i++){
		if(!is_prime[i]) continue;
		for(ll j = 2*i;j*j<=b-1;j+=i)is_prime[j] = false;
		for(ll j = a-a%i;j<b;j += i){
			if(j< a) continue;
			if(is_prime_ab[j-a]) is_prime_ab[j-a] = false;
		}
	}
	ll res = 0;
	for(ll i = a;i< b ;i++ )if(is_prime_ab[i-a] ) prime[res++] = i;
	return res;
}
// nが素数かどうか判定
bool is_primef(ll n){
	if(n==1) return false;
	for(ll i=2;i*i<=n;i++)
		if(n%i==0)return false;
	return true;
}

vector<ll> divisors(ll n){
	vector<ll> res;
	for(ll i=1;i*i<=n;i++){
		if(n%i != 0) continue;
		res.push_back(i);
		if(n/i== i)continue;
		res.push_back(n/i);
	}
	return res;
}
map<ll,ll> prime_factors(ll n){
	map<ll,ll> res;
	if(n<=1){
		res[n] = 1;
		return res;
	}
	
	//for(int i=2,_n = n;i*i<=_n;i++){
	for(ll i=2;i*i<=n;i++){
		while(n%i==0){
			res[i]++;
			n /= i;
		}
	}
	if(n!=1)res[n] = 1;
	return res;
}

//1からnまででnと互いにそなものの数
ll euler_phi(ll n){
	ll cnt = n;
	map<ll,ll> res = prime_factors(n);
	for(auto it = res.begin(),end = res.end();it!=end;it++){
		cnt = cnt/it->first*(it->first-1);
	}
	return cnt;
}
ll pow(ll n,ll m){
	vector<ll> a(33);
	a[0] = n;
	for(int i=1;i<32;i++){
	a[i] = (a[i-1]*a[i-1])%INF;
	}
	ll res = 1;
	for(int i=0;i<32;i++){
	if( ( m&(1<<i) ) ){
		res = (res*a[i])%INF;
		}
	}
	return res;
}


template<typename T,T MOD = 1000000007>
struct Mint{
    T v;
    vector<Mint> fact;
    vector<Mint> fact_inv;
    Mint():v(0){}
    Mint(signed v):v(v){}
    Mint(long long t){v=t%MOD;if(v<0) v+=MOD;}
  //  Mint(ll t){v=t%MOD;if(v<0) v+=MOD;}

    Mint pow(long long k){
        Mint res(1),tmp(v);
        while(k){
            if(k&1) res*=tmp;
            tmp*=tmp;
            k>>=1;
        }
        return res;
    }

    static Mint add_identity(){return Mint(0);}
    static Mint mul_identity(){return Mint(1);}

    Mint inv(){return pow(MOD-2);}

    Mint& operator+=(Mint a){v+=a.v;if(v>=MOD)v-=MOD;return *this;}
    Mint& operator-=(Mint a){v+=MOD-a.v;if(v>=MOD)v-=MOD;return *this;}
    Mint& operator*=(Mint a){v=1LL*v*a.v%MOD;return *this;}
    Mint& operator/=(Mint a){return (*this)*=a.inv();}

    Mint operator+(Mint a) const{return Mint(v)+=a;};
    Mint operator-(Mint a) const{return Mint(v)-=a;};
    Mint operator*(Mint a) const{return Mint(v)*=a;};
    Mint operator/(Mint a) const{return Mint(v)/=a;};

    Mint operator-() const{return v?Mint(MOD-v):Mint(v);}

    bool operator==(const Mint a)const{return v==a.v;}
    bool operator!=(const Mint a)const{return v!=a.v;}
    bool operator <(const Mint a)const{return v <a.v;}
    
    Mint comb(long long n,int k){
        Mint res(1);
        for(int i=0;i<k;i++){
            res*=Mint(n-i);
            res/=Mint(i+1);
        }
        return res;
    }
};

typedef Mint<ll> Mi;

int main(){
	ll mod = 1e9+7;
	ll n;
	cin>>n;
	vector<ll> a(n);
	vector< map<ll,ll> > p(n);
	vector< Mi > b(n);
	for(ll i=0;i<n;i++){
	    cin>>a[i];
	    b[i] = Mi(a[i]);
	    p[i] = prime_factors(a[i]);
	}
	
	for(ll i=0;i<n;i++){
	    for(auto j:p[i]){
		p[i][j.first] = pow( j.first , j.second ); 
	    }
	}
	map<ll,ll> ma;
	for(ll i=0;i<n;i++){
	    for(auto j:p[i]){
		ma[j.first]  = max( ma[j.first] , j.second );
	    }
	}
	Mi kou(1);
	for(auto i:ma) kou *= i.second;

	Mi res( 0 );

	for(ll i=0;i<n;i++){
	    //Mi sum(1);
	   /* for(auto j:ma){
		//sum *= pow( j.first , j.second - p[i][j.first] );
		if( p[i][j.first] == 0 ) p[i][j.first] = 1;
		sum *= j.second/p[i][j.first];
		sum %= mod;
	    }*/
	    
	    //res += sum;
	    res += kou/b[i];
	//    res %= mod;
	}
	cout<<res.v<<endl;

	return 0;
}

Measured memory_bytes: 4480