#if __has_include("D:/dhiraj/Programming/debug.h") && __has_include(<stdint.h>)
	#include "D:/dhiraj/Programming/debug.h"
#else
	#include <bits/stdc++.h>
	using namespace std;
	#define line 1
	#define d(...) 2
#endif

// Function declaration
void solve();

// Data Type
#define ull                 unsigned long long int
#define ll                  long long int
#define ld                  long double

// Loops
#define loop(i,s,e)         for(ll i=(s);i<(e);i++)
#define rloop(i,s,e)        for(ll i=(s);i>=(e);i--)

// Stl
#define pb                  push_back
#define pf                  push_front
#define eb                  emplace_back
#define popb                pop_back
#define popf                pop_front
#define mp                  make_pair
#define mt                  make_tuple
#define ff                  first
#define ss                  second
#define vll                 vector<ll>
#define pll                 pair<ll,ll>
#define ub                  upper_bound                
#define lb                  lower_bound
#define bs                  binary_search        
#define all(x)              begin(x),end(x)
#define get(ind,tup)        get<ind>(tup)

// Maths
#define PI                  (2*acos(0.0))
#define gcd(a,b)            __gcd((a),(b))
#define lcm(a,b)            ((a)/(__gcd((a),(b)))*(b))
#define log(x,b)            (log(x)/log(b))
#define INF                 LLONG_MAX

// Big data
const int Mod = 1e9+7;
#define Mul(a,b)            (((a) % Mod)*((b) % Mod)) % Mod
#define Sum(a,b)            (((a) % Mod)+((b) % Mod)) % Mod
#define Sub(a,b)            (((a) % Mod)-((b) % Mod) + Mod) % Mod
#define Div(a,b)			Mul(a,modInverse(b))

// Bit-Manipulation
#define setbit(n,pos)       n |= (1LL<<pos)
#define resetbit(n,pos)     n &= (~(1LL<<pos))
#define toogle(n,pos)       n ^= (1LL<<pos)
#define atpos(n,pos)        ((n&(1LL<<pos))!=0)
#define bits(n)             (floor(log2(n)) + 1)
#define firstone(n)         __builtin_ffs(n)
#define countone(n)         __builtin_popcount(n)

// Extra
#define fast                ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define scan(any)           for(auto &i:any) cin>>i;
#define scanp(any)          for(auto &i:any) cin>>i.ff>>i.ss;
#define print(any)          for(auto &i:any) cout<<i<<" "; nl;
#define printp(any)         for(auto &i:any) cout<<i.ff<<" "<<i.ss<<endl;
#define flush               cout.flush()
#define nl                  cout<<'\n'
#define endl                '\n'    

int main()
{
	#ifdef Dhiraj
		freopen("D:/dhiraj/Programming/input.txt","r",stdin);
		freopen("D:/dhiraj/Programming/output.txt","w",stdout);
	#endif
	
	fast;
	int t = 1;
	while(t--)
		solve();
	return 0;
}

const ll size = 1e6+7;
ll fre[size];
void primeFact(ll n)
{
	if(n<=1) return;
	ll cnt = 0;
	while(n%2==0)
	{
		n/=2;
		cnt++;
	}
	fre[2] = max(fre[2],cnt);

	for(ll i=3;i<=sqrt(n);i+=2)
	{
		cnt = 0;
		while(n%i==0)
		{
			n/=i;
			cnt++;
		}
		fre[i] = max(fre[i],cnt);
	}
	if(n>2) fre[n] = max(fre[n],1LL);
}

ll power(ll x, ll y, ll p = Mod) 
{ 
    ll res = 1;
    x = x % p; 
    while(y > 0) 
    { 
        if (y & 1) 
            res = (res*x) % p;   
        y = y>>1;
        x = (x*x) % p;   
    } 
    return res;
}
ll modInverse(ll b,ll m = Mod) 
{ 
    // gcd(b,m) must 1
    // m must be prime
    return power(b,m-2,m);
}

void solve()
{
	ll n;
	cin>>n;
	
	vll a(n);
	scan(a);

	loop(i,0,n) 
		primeFact(a[i]);

	loop(i,0,size)
		if(fre[i])
			fre[i] = power(i,fre[i]);
	
	ll lcm = 1;
	loop(i,0,size)
		if(fre[i])
			lcm = Mul(lcm,fre[i]);
	
	ll sum = 0;
	loop(i,0,n)
		sum = Sum(sum,Div(lcm,a[i]));

	cout<<sum<<endl;
}

Measured memory_bytes: 6656