#include <bits/stdc++.h>
#define rep(i, n) for (int i=0; i<(n); ++i)
#define repr(i, a, b) for (int i=a; i<(b); ++i)
#define reprev(i, n) for (int i=n-1; i>=0; --i)
#define reprrev(i, a, b) for (int i=b-1; i>=(a); --i)
using namespace std;
using ll = long long;
using P = pair<int, int>;

const int mod = 1000000007;
vector<int> primes;

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 {
        mint res(*this);
        return res+=a;
    }
    mint operator-(const mint a) const {
        mint res(*this);
        return res-=a;
    }
    mint operator*(const mint a) const {
        mint res(*this);
        return res*=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 {
        mint res(*this);
        return res/=a;
    }
};

vector<int> Eratosthenes(const int N) {
    vector<bool> is_prime( N + 1 );
    for( int i = 0; i <= N; i++ ) {
        is_prime[ i ] = true;
    }
    vector<int> P;
    for( int i = 2; i <= N; i++ ) {
        if( is_prime[ i ] ) {
            for( int j = 2 * i; j <= N; j += i ) {
                is_prime[ j ] = false;
            }
            P.emplace_back( i );
        }
    }
    return P;
}

map<int, int> count_prime(int x){
    map<int, int> pr_ct;
    if (x <= 1) return pr_ct;
    for (int p: primes) {
        if (x == 1) break;
        if (x % p == 0) {
            pr_ct[p] = 0;
            while (x % p == 0) {
                pr_ct[p] += 1;
                x /= p;
            }
        }
    }
    return pr_ct;
}

struct Sieve {
  int n;
  vector<int> f, primes;
  Sieve(int n=1):n(n), f(n+1) {
    f[0] = f[1] = -1;
    for (ll i = 2; i <= n; ++i) {
      if (f[i]) continue;
      primes.push_back(i);
      f[i] = i;
      for (ll j = i*i; j <= n; j += i) {
        if (!f[j]) f[j] = i;
      }
    }
  }
  bool isPrime(int x) { return f[x] == x;}
  vector<int> factorList(int x) {
    vector<int> res;
    while (x != 1) {
      res.push_back(f[x]);
      x /= f[x];
    }
    return res;
  }
  vector<P> factor(int x) {
    vector<int> fl = factorList(x);
    if (fl.size() == 0) return {};
    vector<P> res(1, P(fl[0], 0));
    for (int p : fl) {
      if (res.back().first == p) {
        res.back().second++;
      } else {
        res.emplace_back(p, 1);
      }
    }
    return res;
  }
};

int main() {
    cout << fixed << setprecision(10);
    
    int N; cin >> N;
    vector<int> A(N);
    rep(i, N) cin >> A[i];

    // primes = Eratosthenes(int(1e6));
    Sieve sieve(1e6);

    map<int, int> all_prime_count;
    rep(i, N) {
        // cout << "A " << A[i] << endl;
        auto f = sieve.factor(A[i]);
        // map<int, int> pr_ct = count_prime(A[i]);
        for (auto x: f) {
            all_prime_count[x.first] = max(all_prime_count[x.first], x.second);
        }
        // cout << endl;
    }

    mint lcmn = 1;
    for (auto x: all_prime_count) {
        lcmn *= mint(x.first).pow(x.second);
        /*
        rep(i, x.second) {
            lcmn *= x.first;
        }
        */
    }
    mint ans = 0;
    rep(i, N) {
        ans += lcmn / A[i];
    }
    cout << ans.x << endl;
    return 0;
}

Measured memory_bytes: 4988