#include <bits/stdc++.h>
using namespace std;

// #include <boost/algorithm/string/join.hpp>
// using boost::algorithm::join;
//
// #include "boost/multi_array.hpp"
// boost::multi_array<int, 3> dp;
// dp.resize(boost::extents[10][9][8]);
//
// #include <boost/multiprecision/cpp_dec_float.hpp>  // quite slowly
// #include <boost/multiprecision/cpp_int.hpp>
// namespace mp = boost::multiprecision; // mp::log10
// using bigint = boost::multiprecision::cpp_int;
// using rational = mp::cpp_rational;  // double d = static_cast<double>(r);

typedef long long ll;
typedef unsigned long long ull;
//typedef long double ld;

typedef map<int, int> mii;
typedef pair<int, int> pii;
typedef pair<double,double> pdd;
typedef set<int> si;
typedef set<ll> sll;
typedef vector<int> vi;
typedef vector<pair<int, int > > vii;
typedef vector<ll> vll;
typedef vector<double> vd;
typedef vector<vi> vvi;
typedef vector<vii> vvii;
typedef vector<vll> vvll;

constexpr ll MOD = 1e9+7;
template<typename T>constexpr auto inf=numeric_limits<T>::max()/4;
constexpr int INF=inf<int>;
constexpr ll LINF=inf<ll>;

#define Sort(x) sort(begin(x),end(x))
#define Reverse(x) reverse(begin(x),end(x))
#define ABS(a,b) ((a)<(b)?(b)-(a):(a)-(b))
#define nbit(n) (1ull<<(n))
#define _ol3(_1,_2,_3,name,...)name
#define _rep(i,n)_repi(i,0,n)
#define _repi(i,a,b)for(int i=a,i##_l=(b);i<i##_l;++i)
#define REP(...) _ol3(__VA_ARGS__,_repi,_rep,)(__VA_ARGS__)
#define REPR(i,n) for(int i=n-1;i>=0;--i)
#define REPA(i,v) REP(i,(v).size())

// sort(begin(x), end(x), greater<ll>());
// lower_bound(a.begin(), a.end(), val): a[i] ≥ valである最左の位置
// upper_bound(a.begin(), a.end(), val): a[i] > valである最左の位置

// Returns minimum of a and b.
// If a is less b, a is set to b.
template<typename T>
T chmin(T& a, T b) {
  if (a > b) {
    a = b;
  }
  return a;
}

// Returns maximum of a and b.
// If a is less b, a is set to b.
template<typename T>
T chmax(T& a, T b) {
  if (a < b) {
    a = b;
  }
  return a;
}

template <typename T>
void dumpContents(const T& v, const string& msg)
{
  cerr << "### " << msg << " ###\n";
  for (const auto& x : v) {
    cerr << x << " ";
  }
  cerr << endl;
}

struct before_main_function {
  before_main_function() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout<<setprecision(20)<<fixed;
#define endl "\n"
  }
} before_main_function;

struct mint {
  ll x;

  // _x can be negative
  mint(ll _x=0) :
    x(_x >= 0 ? _x%MOD : (MOD - (-_x) % MOD) % MOD)
    {}

  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) {
    return (*this) *= a.inv();
  }

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

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

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

  mint pow(ll t) const {
    if (!t) return 1;
    mint a = pow(t>>1);
    a *= a;
    if (t&1) a *= *this;
    return a;
  }

  mint inv() const {
    // MOD should be a prime
    return pow(MOD-2);
  }

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

  bool operator==(const mint& other) const {
    return x == other.x;
  }

  bool operator!=(const mint& other) const {
    return x != other.x;
  }

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

  friend istream &operator>>(istream &is, mint& a) {
    ll t;
    is >> t;
    a = mint(t);
    return (is);
  }
};

/**
 * PrimeTools class provides functions dealing with primes, calculating primes
 * upto N in advance.
 *
 * Note that when you only deal with factors, N <- sqrt(N) would be enough.
 */
class PrimeTools {
  const ll N;
  vll primes;

  void eratosthenesPrimes(const ll N)
  {
    vll tmp(N+1, 1);
    tmp[0] = 0;
    tmp[1] = 0;
    tmp[2] = 1;

    if (N<=1) return;
    primes.push_back(2);
    if (N<=2) return;

    for(ll i=3; i<=N; i+=2) {
      if (tmp[i] == 0) continue;
      primes.push_back(i);
      if (N<i*i) continue;
      for (ll k=i+i; k<=N; k+=i) {
        tmp[k]=0;
      }
    }
  }

public:

  PrimeTools(const ll _N=10000000)
    : N(_N) {

    eratosthenesPrimes(N);
  }

  typedef typename vll::iterator iterator;
  typedef typename vll::const_iterator const_iterator;

  inline iterator begin() noexcept { return primes.begin(); };
  inline const_iterator cbegin() const noexcept { return primes.cbegin(); };
  inline iterator end() noexcept { return primes.end(); };
  inline const_iterator cend() const noexcept { return primes.cend(); };

  bool isPrime(const ll n) const {
    return binary_search(cbegin(), cend(), n);
  }

  // A return set
  // * does not include 1
  // * includes n
  //
  // 2 -> {2}
  // 6 -> {2, 3}
  // 16 -> {2}  // uniqueなもののみ
  //
  // 約数を知りたい場合は、divisors()
  sll uniqueFactors(ll n) const {
    sll ret;
    if (n==1) return ret;

    const auto itend = upper_bound(cbegin(), cend(), sqrt(n));

    for (auto it = primes.begin(); it!=itend; it++) {
      const ll p = *it;
      if (n==1) break;
      if (n % p == 0) {
        ret.insert(p);
        while (n % p == 0) {
          n /= p;
        }
      }
    }
    if (n>1) ret.insert(n);
    return ret;
  }

  map<ll,ll> factorExponents(ll n) const {
    map<ll, ll> ret;
    if (n==1) return ret;

    for (const ll p : uniqueFactors(n)) {
      if (n % p == 0) {
        ret.insert(make_pair(p,0));
        while (n % p == 0) {
          n /= p;
          ret[p] += 1;
        }
      }
    }
    if (ret.empty()) ret.insert(make_pair(n,1)); // n is prime
    return ret;
  }

  /*
   * Rutuns a vector of sorted products of b^0, b^1, ... , b^n"
   */
  static vll makeProducts(const ll base, const ll n) {
    vll ret;
    ret.reserve(n+1);
    ret.push_back(1);
    for (ll i=1; i<=n; ++i) {
      ret.push_back(ret.back()*base);
    }
    return ret;
  }

  /*
   * Returns a sorted sequence of divisors of n.
   * For example, 12 => (1 2 3 4 6 12)"
   */
  vll divisors(long n) const {
    vll ret;
    ret.push_back(1);
    for (const auto& kv : factorExponents(n)) {
      const vll products = makeProducts(kv.first, kv.second);
      vll tmp;
      tmp.reserve(ret.size()*products.size());
      for (const ll x : ret) {
        for (const ll y : products) {
          tmp.push_back(x*y);
        }
      }
      ret.swap(tmp);
    }
    std::sort(ret.begin(), ret.end());
    return ret;
  }

};

// ========== end of template ==========

PrimeTools primes(1e3+10);

vector<vector<ll> > cache(1e3+10, vector<ll>(21, 1));

// powd returns x^y mod m in O(log y).
long long powd(long long x, long long y, const long long md=1000000007){
  long long res=1;
  while(y){
    if(y&1) res=res*x%md;
    x=x*x%md;
    y>>=1;
  }
  return res;
}

int main(int argc, char** argv) {
  int N;
  cin >> N;
  vi A(N);
  for (auto& a : A) {
    cin >> a;
  }

  vector<map<int, int> > factors(N);
  map<int, int> lcm;
  REP(i, N) {
    int x = A[i];

    for (auto p : primes) {
      if (x==1) break;

      int c = 0;
      while(x%p==0) {
        x /= p;
        c++;
      }
      if (c==0) continue;

      factors[i][p] = c;
      chmax(lcm[p], c);
    }

    if (x>1) {
      factors[i][x] = 1;
      chmax(lcm[x], 1);
    }
  }

//for (auto kv : lcm) {
//  cerr << "p " << kv.first << ": " << kv.second << endl;
//}

  for (auto p : primes) {
    ll x = 1;
    cache[p][0] = x;
    REP(i, 1, 21) {
      x *= p;
      x %= MOD;
      cache[p][i] = x;
    }
  }

  //
  mint LCM = 1;
  for (const auto& pm : lcm) {
    LCM *= mint(pm.first).pow(pm.second);
  }

  mint ret = 0;
  REP(i, N) { // 10^4
    ret += LCM/A[i];
  }

  cout << ret << endl;

  return 0;
}

/* vim: set expandtab shiftwidth=2 softtabstop=2 : */


Measured memory_bytes: 3328