#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cctype>
#include <cassert>
#include <climits>
#include <string>
#include <bitset>
#include <cfloat>
#include <unordered_set>
#include <unordered_map>
#include <iomanip>
//#pragma GCC optimize("Ofast")
//#define _GLIBCXX_DEBUG
using namespace std;
typedef long double ld;
typedef long long int ll;
typedef unsigned long long int ull;
//#define int ll
typedef vector<int> vi;
typedef vector<char> vc;
typedef vector<bool> vb;
typedef vector<double> vd;
typedef vector<string> vs;
typedef vector<ll> vll;
typedef pair<int,int> pii;
typedef vector<pair<int,int> > vpii;
typedef vector<vector<int> > vvi;
typedef vector<vector<char> > vvc;
typedef vector<vector<string> > vvs;
typedef vector<vector<ll> > vvll;
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define irep(it, stl) for(auto it = stl.begin(); it != stl.end(); it++)
#define drep(i,n) for(int i = (n) - 1; i >= 0; --i)
#define fin(ans) cout << (ans) << '\n'
#define mp(p,q) make_pair(p, q)
#define pb(n) push_back(n)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define floatprec(dig) fixed << setprecision(dig)
#define Sort(a) sort(a.begin(), a.end())
#define Rort(a) sort(a.rbegin(), a.rend())
#define MATHPI acos(-1)
#define itn int;
#define invar(typ, var) typ var; cin >> var;
int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
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;}
struct io{io(){ios::sync_with_stdio(false);cin.tie(0);}};
const int INF = INT_MAX / 2;
const ll LLINF = 1LL<<60;
constexpr ll MOD = 1000000007;
const double EPS = 1e-9;

//constexpr ll MOD = 1000000007;
// modint: mod 計算を int を扱うように扱える構造体
template<int MOD> struct Fp {
    long long val;
    constexpr Fp(long long v = 0) noexcept : val(v % MOD) {
        if (val < 0) v += MOD;
    }
    constexpr int getmod() { return MOD; }
    constexpr Fp operator - () const noexcept {
        return val ? MOD - val : 0;
    }
    constexpr Fp operator + (const Fp& r) const noexcept { return Fp(*this) += r; }
    constexpr Fp operator - (const Fp& r) const noexcept { return Fp(*this) -= r; }
    constexpr Fp operator * (const Fp& r) const noexcept { return Fp(*this) *= r; }
    constexpr Fp operator / (const Fp& r) const noexcept { return Fp(*this) /= r; }
    constexpr Fp& operator += (const Fp& r) noexcept {
        val += r.val;
        if (val >= MOD) val -= MOD;
        return *this;
    }
    constexpr Fp& operator -= (const Fp& r) noexcept {
        val -= r.val;
        if (val < 0) val += MOD;
        return *this;
    }
    constexpr Fp& operator *= (const Fp& r) noexcept {
        val = val * r.val % MOD;
        return *this;
    }
    constexpr Fp& operator /= (const Fp& r) noexcept {
        long long a = r.val, b = MOD, u = 1, v = 0;
        while (b) {
            long long t = a / b;
            a -= t * b; swap(a, b);
            u -= t * v; swap(u, v);
        }
        val = val * u % MOD;
        if (val < 0) val += MOD;
        return *this;
    }
    constexpr bool operator == (const Fp& r) const noexcept {
        return this->val == r.val;
    }
    constexpr bool operator != (const Fp& r) const noexcept {
        return this->val != r.val;
    }
    friend constexpr ostream& operator << (ostream &os, const Fp<MOD>& x) noexcept {
        return os << x.val;
    }
    friend constexpr istream& operator >> (istream &is, Fp<MOD>& x) noexcept {
        return is >> x.val;
    }
    friend constexpr Fp<MOD> modpow(const Fp<MOD> &a, long long n) noexcept {
        if (n == 0) return 1;
        auto t = modpow(a, n / 2);
        t = t * t;
        if (n & 1) t = t * a;
        return t;
    }
};

using mint = Fp<((int)MOD)>;

//素因数分解する
//https://drken1215.hatenablog.com/entry/2019/10/03/175800
vector<pair<ll, ll>> prime_factorize(ll n) {
  vector<pair<ll, ll>> res;
  for(ll p = 2; p * p <= n; ++p) {
    if(n % p != 0) continue;  //約数判定
    int num = 0;
    //その素因数がいくつ含まれるか調べる
    while(n % p == 0) {
      ++num;
      n /= p; //破壊的にnを変更していることに注意
    }
    res.push_back(make_pair(p, num));
  }
  //ここでは，(n , 1)も含めることに注意
  if(n != 1) res.push_back(make_pair(n, 1));
  return res;
}

void lcm(unordered_map<ll, ll>& lcm, unordered_map<ll, ll>& AF) {
  for(auto p : AF) {
    if(lcm.find(p.first) == lcm.end()) {
      lcm.emplace(p.first, p.second);
    } else {
      lcm[p.first] = max(lcm[p.first], p.second);
    }
  }
}

signed main(void) {
  cin.tie(0); ios::sync_with_stdio(false);

  ll N;
  cin >> N;
  vll A(N);
  if(N == 1) {
    fin(1);
    return 0;
  }
  
  vector<unordered_map<ll, ll>> AF(N, unordered_map<ll, ll>());
  rep(i, N) {
    cin >> A[i];
    
    ll n = A[i];
    for(ll p = 2; p * p <= n; ++p) {
      if(n % p != 0) continue;  //約数判定
      int num = 0;
      //その素因数がいくつ含まれるか調べる
      while(n % p == 0) {
        ++num;
        n /= p; //破壊的にnを変更していることに注意
      }
      
      AF[i].emplace(p, num);
    }
    
    if(n != 1) AF[i].emplace(n, 1);
  }
  
  unordered_map<ll, ll> lc = AF[0];
  for(int i=1; i<N; i++) {
    lcm(lc, AF[i]);
  }
  
  //最小公倍数が求まった！
  
  mint lcmod = 1;
  for(auto p : lc) {
    mint a = 1;
    rep(i, p.second) {
      a *= p.first;
    }
    
    lcmod *= a;
  }
  
  mint sum = 0;
  rep(i, N) {
    sum += lcmod / mint(A[i]);
  }
  
  fin(sum.val);
}

Measured memory_bytes: 3328