#include <bits/stdc++.h>
typedef long long ll;
#define rep(i,a,n) for(ll i = a;i < n;i++)
#define rrep(i,a,n) for(ll i = n; i >= a;i--)
#define LINF 1e18
#define INF 1e9
#define fs first
#define sc second
using namespace std;
typedef pair<ll,ll> P;


const ll MOD = 1e9+7;

template <ll MOD>
struct modint{
    ll x;
    modint() : x(0) {}
    modint(ll a): x((a % MOD + MOD) % MOD) {}

    bool operator!() const{return !x;}

    bool operator<(const modint &a) const{
        modint res(*this);
        return res.x < a.x;
    }
    
    bool operator>(const modint &a) const{
        modint res(*this);
        return res.x > a.x;
    }

    modint &operator+=(const modint &a){
        if((x += a.x) >= MOD) x -= MOD;
        return *this;
    }

    modint &operator-=(const modint &a){
        if((x += MOD - a.x) >= MOD) x -= MOD;
        return *this;
    }

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

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

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

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

    modint operator+(const modint &a) const{ return modint(*this) += a; }
    modint operator-(const modint &a) const{ return modint(*this) -= a; }
    modint operator*(const modint &a) const{ return modint(*this) *= a; }
    modint operator/(const modint &a) const{ return modint(*this) /= a; }
    modint operator%(const modint &a) const{ return modint(*this) %= a; }
    bool operator==(const modint &a) const{ return x == a.x; }
    bool operator!=(const modint &a) const{ return x != a.x; }


    modint pow(ll n) const{
        modint res(1), a(x);
        while(n > 0){
            if(n & 1) res *= a;
            a *= a;
            n /= 2;
        }
        return res;
    }

    modint inv() const{
        ll a = x,b = MOD,u = 1,v = 0;
        while(b){
            ll t = a/b;
            a -= t*b; swap(a,b);
            u -= t*v; swap(u,v);
        }
        u %= MOD;
        if(u < 0) u += MOD;
        return modint(u);
    }

    friend ostream &operator<<(ostream &os, const modint &m){
        return os << m.x;
    }

    friend istream &operator>>(istream &is, modint &m){
        ll t;
        is >> t;
        m = modint<MOD>(t);
        return (is);
    }
    
    static ll get_mod(){ return MOD; }
};
using mint = modint<MOD>;




void prime_factorization(ll n,vector<ll> &used_list, map<ll,ll> &lcm_prime_list){

  ll a = 2;
  while(n >= a*a){
    if(n % a == 0){
      ll temp = 0;

      while(n % a == 0){
        temp++;
        n /= a;
      }

      if(!lcm_prime_list.count(a)){
        lcm_prime_list[a] = temp;
        used_list.push_back(a);
      }
      else lcm_prime_list[a] = max(lcm_prime_list[a],temp);

    }

    a++;
  }

  if(n > 1){
    if(!lcm_prime_list.count(n)){
      lcm_prime_list[n] = 1;
      used_list.push_back(n);
    }
    else lcm_prime_list[n] = max(lcm_prime_list[n],1LL);
  }
  
  return;
}



int main(){

  map<ll,ll> lcm_prime_list;
  vector<ll> used_list;

  ll n;
  cin >> n; 

  ll a[n];

  mint lcm_a = 1,ans = 0;


  rep(i,0,n){

    cin >> a[i];
    prime_factorization(a[i],used_list,lcm_prime_list);

  }

  sort(used_list.begin(),used_list.end()); 
  
  rep(i,0,used_list.size()){
    mint temp = used_list[i];
    temp = temp.pow(lcm_prime_list.at(used_list[i]));

    lcm_a *= temp;
  }

  rep(i,0,n){
    mint temp = a[i];
    ans += lcm_a / temp;
  }

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

Measured memory_bytes: 1024