#include <bits/stdc++.h>
using namespace std;

#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define MIN(a) *min_element(all(a))
#define MAX(a) *max_element(all(a))
#define SUM(a) accumulate(all(a), 0LL)
#define REP(i, n) for(int (i)=0; (i)<(n); (i)++)
#define RREP(i, n) for(int (i)=(n)-1; (i)>=0; (i)--)
#define FOR(i, m, n) for(int (i)=(m); (i)<(n); i++)
#define FORR(i, m, n) for(int (i)=(n)-1; (i)>=(m); i--)
#define debug(x) cerr << #x << " = " << x << endl
//#define int long long

typedef long long ll;
//ll const MOD = 998244353;
ll const MOD = 1e9+7;
int const inf = 1e9;
ll const INF = 1e18;

inline void ios_(){cin.tie(0); ios::sync_with_stdio(false);}
template<typename T> int size(const T& a){return (int)a.size();}
template<typename T> T Div(T a, T b){return (a + b - 1) / b;}
template<typename T> bool chmin(T& a, const T& b){if(a > b){a = b; return true;} return false;}
template<typename T> bool chmax(T& a, const T& b){if(a < b){a = b; return true;} return false;}

class Combination{
public:
    int N;
    ll mod;
    vector<ll> fact;

    Combination(int n, ll m) : N(n), mod(m), fact(n+1){
        fact[0] = 1;
        for(ll i=1; i<=N; i++){
            fact[i] = i * fact[i-1] % mod;
        }
    }

    ll POW(ll a, ll b){
        ll res = 1;
        while(b > 0){
            if(b & 1){
                res = res * a % mod;
            }
            a = a * a % mod;
            b >>= 1;
        }
        return res;
    }

    ll combin(int n, int k){
        if(n < 0 || k < 0 || n < k){
            return 1;
        }
        return fact[n] * POW(fact[k] * fact[n-k] % mod, mod - 2) % mod;
    }

    ll moddiv(ll a, ll b){
        return a % mod * POW(b % mod, mod - 2) % mod;
    }
};

class PrimeNumber{
public:
    int N;
    vector<ll> table;

    void makeTable(int n){
        N = n;
        vector<bool> v(n+1, true);
        v[0] = false;
        v[1] = false;
        int m = sqrt(n);
        for(int i=2; i<=m; i++){
            if(v[i]){
                int j = i*2;
                while(j <= n){
                    v[j] = false;
                    j += i;
                }
            }
        }
        for(int i=0; i<=n; i++){
            if(v[i]){
                table.push_back(i);
            }
        }
    }

    static bool is_prime(ll n){
        if(n < 2){
            return false;
        }
        ll m = sqrt(n);
        for(ll i=2; i<=m; i++){
            if(n%i == 0){
                return false;
            }
        }
        return true;
    }

    static map<ll,int> factorization(ll n){
        map<ll,int> mp;
        for(ll i=2; i*i<=n; i++){
            while(n%i == 0){
                n /= i;
                mp[i]++;
            }
        }
        if(n > 1){
            mp[n]++;
        }
        return mp;
    }
};

signed main(){
    int n;
    cin >> n;
    vector<ll> v(n);
    for(auto& i : v) cin >> i;

    map<ll,int> mp;

    REP(i, n){
        auto m = PrimeNumber::factorization(v[i]);
        for(auto e : m){
            chmax(mp[e.first], e.second);
        }
    }
    
    Combination C(n, MOD);
    ll ans = 0;
    
    ll lcm = 1;
    for(auto e : mp){
        lcm *= C.POW(e.first, e.second);
        lcm %= MOD;
    }

    REP(i, n){
        ans += C.moddiv(lcm, v[i]);
        ans %= MOD;
    }

    cout << ans << endl;   
    
    return 0;
}


Measured memory_bytes: 1024