#pragma GCC optimize("Ofast")   //Comment optimisations for lleractive problems (use endl)
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops")
#include<bits/stdc++.h>

using namespace std;

#define  fastio         ios:: sync_with_stdio(0);cin.tie(0);cout.tie(0);cout<<fixed;cout<<setprecision(10);
#define  randomINIT     mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
#define  foo(i,a,n)     for(ll i = (a); i <= n; i++)
#define  frr(i,a,n)     for(ll i = (a); i >= n; i--)
#define  fo(i,n)        for(ll i = 0; i < n; i++)
#define  all(x)         (x).begin(),(x).end()
#define  mset(x,val)    memset(x,val,sizeof(x))
#define  newl           cout<<"\n"
#define  pb             push_back
#define  mp             make_pair
#define  s              second
#define  f              first
#define  dline          cerr<<"///REACHED///\n";
#define  deb1(x)        cerr<<#x<<" = "<<x<<'\n';
#define  deb2(x,y)      cerr<<'['<<#x<<','<<#y<<"] = "<<'['<<x<<','<<y<<']'<<'\n';
#define  deb3(x,y,z)    cerr<<'['<<#x<<','<<#y<<','<<#z<<"] = "<<'['<<x<<','<<y<<','<<z<<']'<<'\n';

typedef  long long             ll;
typedef  long double           ld;
typedef  pair<ll,ll>           pll;
typedef  vector<ll>            vll;
typedef  vector<pll>           vpll;

const ll   MOD   =  1e+9+7;
const ll   INF   =  0x7f7f7f7f7f7f7f7f;
const ll  INFi  =  0x7f7f7f7f;
const ll   MAXN  =  2e+6+7;

vll adj[MAXN];ll visit[MAXN]={};
ll dx8[]={0,1,1,1,0,-1,-1,-1}, dy8[]={1,1,0,-1,-1,-1,0,1};
ll dx4[]={0,1,0,-1}, dy4[]={1,0,-1,0};

//<<-----Declare Variable Here------->>//
ll t=1;
ll prime[MAXN]; 
unordered_map<ll,ll> max_map; 
//<<-----Implement Functions Here---->>//
ll add(ll a, ll b) {return (a+b)%MOD;}
ll sub(ll a, ll b) {return (a-b+MOD)%MOD;}
ll mult(ll a, ll b) {return (a * b)%MOD;}

ll fastMODInv(ll x){
	ll res=1;
	ll y=MOD-2;
	while(y){
		if(y&1)res=mult(res,x);
		y>>=1;x=mult(x,x);
	}
	return res;
}

ll power(ll x, ll y){
	ll res=1;
	while(y){
		if(y&1)res=mult(res,x);
		y>>=1;x=mult(x,x);
	}
	return res;
}

void sieve() { 
    prime[0] = prime[1] = 1; 
    for (ll i = 2; i < MAXN; i++) { 
        if (prime[i] == 0) { 
            for (ll j = i * 2; j < MAXN; j += i) { 
                if (prime[j] == 0) { 
                    prime[j] = i; 
                } 
            } 
            prime[i] = i; 
        } 
    } 
} 
  
// Function to return the LCM MODulo M 
ll findlcm(vll ar, ll n) { 
  
    for (ll i = 0; i < n; i++) { 
        ll num = ar[i]; 
        unordered_map<ll, ll> temp; 
  
        // Temp stores mapping of prime factor to 
        // its power for the current element 
        while (num > 1) { 
  
            // Factor is the smallest prime factor of num 
            ll factor = prime[num]; 
  
            // Increase count of factor in temp 
            temp[factor]++; 
  
            // Reduce num by its prime factor 
            num /= factor; 
        } 
  
        for (auto it : temp) { 
  
            // Store the highest power of every prime 
            // found till now in a new map max_map 
            max_map[it.first] = max(max_map[it.first], (ll)it.second); 
        } 
    } 
  
    ll ans = 1; 
  
    for (auto it : max_map) { 
  
        // LCM is product of primes to their highest powers MODulo M 
        ans = (ans * power(it.f, it.s)) % MOD; 
    } 
  
    return ans; 
} 
  

//<<-----Start of Main--------------->>//
void MAIN(){
	sieve();
	ll n;cin>>n;
	vll a(n+8);

	foo(i,0,n-1) cin>>a[i];
	
	ll pr=findlcm(a,n), res=0;
	foo(i,0,n-1){
		res=add(res,mult(pr,fastMODInv(a[i])));
	}

	//deb2(pr,res);
	cout<<res;

}

int main(){
	fastio;randomINIT;

	//cin>>t;
	while(t--){
		MAIN();
	}

}

Measured memory_bytes: 64640