// Slower C++ solution:
#include <bits/stdc++.h>

#define rep(i,n) for(int i=0;i<(int)n;i++)

#define rep1(i,n) for(int i=1;i<=(int)n;i++)

typedef long long ll;

using namespace std;

const int mod = 1000000007;

long long modpow(long long a, long long n){

  long long r = 1;

  while (n) {

    r = r * ( (n%2)?a:1 ) %mod;

    a = a * a % mod;

    n >>= 1;

  }

  return r;

}



int main(void){

    int n;cin>>n;

    vector<ll> a(n),b(n,1);

    rep(i,n) cin>>a[i];

    vector<int> sieve1,sieve2(10000,0);

    sieve2[0]=sieve2[1]=-1;

    for(int i=2;i*i<=10000;i++){

        for(int j=i*i;j<10000;j+=i){

            sieve2[j]=i;

        }

    }

    rep(i,10000){

        if(sieve2[i]==0) sieve1.push_back(i);

    }

    

    ll sz=sieve1.size();

    vector<ll> lcm(sz,0);

    rep(i,n){

        ll x=a[i];

        for(int j=0;j<sz;j++){

            ll y=sieve1[j];

            ll buf=0;

            while(x%y==0&&x>1){

                x/=y;

                buf++;

            }

            lcm[j]=max(lcm[j],buf);

        }

        if(x>1){

            bool jud=true;

            rep(i,sz){

                if(x==sieve1[i]){

                    lcm[i]++;

                    jud=true;

                    break;

                }

            }

            if(jud){

                sieve1.push_back(x);

                sz++;

                lcm.push_back(1);

            }

        }

    }

    long long LCM=1;

    rep(i,sz) (LCM*=modpow(sieve1[i],lcm[i]))%=mod;

    long long ans=0;

    for(int i=0;i<n;i++){

        (ans+=LCM*modpow(a[i],mod-2)%mod)%=mod;

    }

    cout<<ans<<endl;

    

}

// Faster C++ solution for the same problem (measured speedup: 1.1773086192143476x):
#include <bits/stdc++.h>

#define rep(i,n) for(int i=0;i<(int)n;i++)

#define rep1(i,n) for(int i=1;i<=(int)n;i++)

#define sp(n) cout << fixed << setprecision(n)

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }

template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

typedef long long ll;

using namespace std;

const int mod = 1000000007;

long long modpow(long long a, long long n){

  long long r = 1;

  while (n) {

    r = r * ( (n%2)?a:1 ) %mod;

    a = a * a % mod;

    n >>= 1;

  }

  return r;

}

struct mint {

  ll x; // typedef long long ll;

  mint(ll x=0):x((x%mod+mod)%mod){}

  mint operator-() const { return mint(-x);}

  mint& operator+=(const mint a) {

    if ((x += a.x) >= mod) x -= mod;

    return *this;

  }

  mint& operator-=(const mint a) {

    if ((x += mod-a.x) >= mod) x -= mod;

    return *this;

  }

  mint& operator*=(const mint a) { (x *= a.x) %= mod; return *this;}

  mint operator+(const mint a) const { return mint(*this) += a;}

  mint operator-(const mint a) const { return mint(*this) -= a;}

  mint operator*(const mint a) const { return mint(*this) *= a;}

  mint pow(ll t) const {

    if (!t) return 1;

    mint a = pow(t>>1);

    a *= a;

    if (t&1) a *= *this;

    return a;

  }

 

  // for prime mod

  mint inv() const { return pow(mod-2);}

  mint& operator/=(const mint a) { return *this *= a.inv();}

  mint operator/(const mint a) const { return mint(*this) /= a;}

};

istream& operator>>(istream& is, mint& a) { return is >> a.x;}

ostream& operator<<(ostream& os, const mint& a) { return os << a.x;}



int main(void){

    ll n;cin>>n;

    vector<ll> a(n);

    map<ll,ll> mp;

    rep(i,n){

        cin>>a[i];

        ll x=a[i];

        for(int j=2;j<=sqrt(x);j++){

            ll buf=0;

            while(x%j==0){

                buf++;

                x/=j;

            }

            chmax(mp[j],buf);

        }

        if(x>1){

            chmax(mp[x],(ll)1);

        }

    }

    ll l=1;

    for(auto& p:mp){

        l*=modpow(p.first,p.second);

        l%=mod;

    }

    ll res=0;

    for(int i=0;i<n;i++){

        (res+=l*modpow(a[i],mod-2)%mod)%=mod;

    }

    cout<<res<<endl;

}