#include <iostream>
#include <vector>
#include <unordered_map>
using namespace std;

#define MAX 10000003
#define ll long long

const ll M = 1e9 + 7;

ll addMod(ll a, ll b)
{
	return ((a % M) + (b % M)) % M;
}

ll mulMod(ll a, ll b)
{
	return ((a % M) * (b % M)) % M;
}
  
ll gcd(ll a, ll b)
{
	if(b == 0)
	{
		return a;
	}
	else
	{
		return gcd(b, a % b);
	}
}
  
ll prime[MAX]; 
unordered_map<ll, ll> max_map; 
  
// Function to return a^n 
ll power(ll a, ll n) 
{ 
    if (n == 0)
    {
        return 1;
    }
    
    ll p = power(a, n / 2) % M;
    p = (p * p) % M; 
    
    if (n & 1) 
    {
        p = (p * a) % M; 
    }
    
    return p; 
} 
  
// Function to find the smallest prime factors 
// of numbers upto MAX 
void sieve() 
{ 
    prime[0] = prime[1] = 1;
    
    for (int i = 2; i < MAX; i++) 
	{ 
        if (prime[i] == 0) 
		{ 
            for (int j = i * 2; j < MAX; j += i) 
			{ 
                if (prime[j] == 0) 
				{ 
                    prime[j] = i; 
                } 
            } 
            
            prime[i] = i;
        } 
    } 
} 
  
// Function to return the LCM modulo M 
ll lcmModuloM(const vector<ll>& ar) 
{ 
  	ll n = ar.size();
  	
    for (int 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], 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.first, it.second)) % M; 
    } 
  
    return ans; 
}

ll gcdExtended(ll a, ll b, ll *x, ll *y) 
{ 
    // Base Case 
    if (a == 0) 
    { 
        *x = 0, *y = 1; 
        return b; 
    } 
  
    ll x1, y1; // To store results of recursive call 
    ll gcd = gcdExtended(b%a, a, &x1, &y1); 
  
    // Update x and y using results of recursive 
    // call 
    *x = y1 - (b/a) * x1; 
    *y = x1; 
  
    return gcd; 
} 
  
 
ll modInverse(ll b, ll M) 
{ 
    ll x, y; // used in extended GCD algorithm 
    ll g = gcdExtended(b, M, &x, &y); 
  
    // Return -1 if b and M are not co-prime 
    if (g != 1) 
        return -1; 
  
    // M is added to handle negative x 
    return (x%M + M) % M; 
} 
 
ll divMod(ll a, ll b)
{
	a = a % M; 
    ll inv = modInverse(b, M); 
    if (inv == -1) 
       cout << "Division not defined"; 
    
    return (inv * a) % M;
	
	//return ((a % M) / (b % M)) % M;
}

void solve()
{	
	sieve();
	
	ll n;
	cin >> n;
	
	vector<ll> myV(n);
	
	for(ll i = 0; i < n; i++)
	{
		cin >> myV[i];	
	}
	
	ll c = lcmModuloM(myV);
	
	ll sum = 0;
	
	for(ll i = 0; i < n; i++)
	{
		sum = addMod(sum, divMod(c, myV[i]));
	}
	
	cout << sum;
}

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	
	solve();
	
	return 0;
}

Measured memory_bytes: 78848