#include <bits/stdc++.h>
#define rep(i,cc,n) for(int i=cc;i<=n;++i)
#define drep(i,cc,n) for(int i=cc;i>=n;--i)
#define sz(s) (int)(s.size())
#define vecprint(v) rep(i,0,v.size()-1)cout << v[i] << " ";cout << endl;
#define arrprint(v,n) rep(i,0,n-1)cout << v[i] << " ";cout << endl;
#define matprint(v,n,m) rep(i,0,n-1){rep(j,0,m-1){cout << v[i][j] << " ";}cout << endl;}
#define SORT(v) sort(v.begin(), v.end())
#define REV(v) reverse(v.begin(), v.end())
using namespace std;
const int mod=1000000007;
const int INF=1001001001;
typedef long long ll;
typedef pair<int,int> P;
template<typename T>
using priority_queue_rev = priority_queue<T, vector<T>, greater<T>>; //小さいものから取り出す

/*---fast pow---*/
ll mod_pow(ll x,ll n){
  ll res = 1;
  while(n > 0){
    if(n & 1) res = res * x % mod;
    x = x * x % mod;
    n >>= 1;
  }
  return res;
}



//*---mint---*/
struct mint {
  ll x;
  mint():x(0){}
  mint(ll x):x((x%mod+mod)%mod){}
  // mint(ll x):x(x){}
  mint& fix() { x = (x%mod+mod)%mod; return *this;}
  mint operator-() const { return mint(0) - *this;}
  mint operator~() const { return mint(1) / *this;}
  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){ (x*=a.pow(mod-2).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 operator/(const mint& a)const{ return mint(*this) /= a;}
  mint pow(ll t) const {
    if(!t) return 1;
    mint res = pow(t/2);
    res *= res;
    return (t&1)?res*x:res;
  }
  bool operator<(const mint& a)const{ return x < a.x;}
  bool operator==(const mint& a)const{ return x == a.x;}
};
mint ex(mint x, ll t) { return x.pow(t);}
istream& operator>>(istream&i,mint&a){i>>a.x;return i;}
ostream& operator<<(ostream&o,const mint&a){o<<a.x;return o;}
typedef vector<mint> vm;
struct comb {
  vm f, g;
  comb(){}
  comb(int mx):f(mx+1),g(mx+1) {
    f[0] = 1;
    rep(i,1,mx) f[i] = f[i-1]*i;
    g[mx] = f[mx].pow(mod-2);
    for(int i=mx;i>0;i--) g[i-1] = g[i]*i;
  }
  mint c(int a, int b) {
    if (a < b) return 0;
    return f[a]*g[b]*g[a-b];
  }
} c(3e6);
//c.c(a,b)=>aCb mod

/*---最大公約数 from 20190929---*/
long long gcd(long long x, long long y) { return y ? gcd(y,x%y) : x;}

/*---最小公倍数 from 20191222---*/
long long lcm(long long x, long long y){return (x*y)/gcd(x,y);}

/*---素因数分解 from 20190929---*/
unordered_map<ll, int> factorize(long long n) {
  unordered_map<ll, int> res;
  // ll n2 = n;
  for (long long i = 2; i*i <= n; ++i) {
    if (n%i) continue;
    while (n%i == 0) {
      n /= i;
      res[i]++;
    }
  }
  if (n != 1) res[n] = 1;
  return res;
}


int main(){
  int n;
  cin >> n;
  vector<ll> a(n);
  rep(i,0,n-1)cin >> a[i];
  unordered_map<ll,int> mp;

  rep(i,0,n-1){
    unordered_map<ll, int> fac = factorize(a[i]);
    for(auto itr = fac.begin(); itr != fac.end(); ++itr) {
      mp[itr->first] = max(mp[itr->first],itr->second);
    }
  }
  mint LCM = 1;
  for(auto itr = mp.begin(); itr != mp.end(); ++itr) {
    LCM *= mod_pow(itr->first, mp[itr->first]);
  }  
  mint ans = 0;
  rep(i,0,n-1){
    ans += LCM / a[i];
  }

  cout << ans << endl;
//  printf("%.10f\n",ans);

  return 0;
}

Measured memory_bytes: 47616