#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
#define int ll

#define REP(i,n) for(int i=0;i<n;++i)
#define ALL(name) name.begin(),name.end()
#define SORT(name) sort(name.begin(), name.end())
#define ZERO(p) memset(p, 0, sizeof(p))
#define MINUS(p) memset(p, -1, sizeof(p))
#if 1
#  define DBG(fmt, ...) printf(fmt, ##__VA_ARGS__)
#else
#  define DBG(fmt, ...)
#endif

const ll LLINF = (1LL<<60);
const int INF = (1LL<<30);
const double DINF = std::numeric_limits<double>::infinity();
const int MOD = 1000000007;
#define MAX_N 100010

template< int mod >
struct ModInt {
  int x;

  ModInt() : x(0) {}

  ModInt(int64_t y) : x(y >= 0 ? y % mod : (mod - (-y) % mod) % mod) {}

  ModInt &operator+=(const ModInt &p) {
    if((x += p.x) >= mod) x -= mod;
    return *this;
  }

  ModInt &operator-=(const ModInt &p) {
    if((x += mod - p.x) >= mod) x -= mod;
    return *this;
  }

  ModInt &operator*=(const ModInt &p) {
      x = (int) (1LL * x * p.x % mod);
      return *this;
  }

  ModInt &operator/=(const ModInt &p) {
      *this *= p.inverse();
      return *this;
  }

  ModInt &operator%=(const ModInt &p) {
      *this %= p.x;
      return *this;
  }

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

  ModInt operator+(const ModInt &p) const { return ModInt(*this) += p; }

  ModInt operator-(const ModInt &p) const { return ModInt(*this) -= p; }

  ModInt operator*(const ModInt &p) const { return ModInt(*this) *= p; }

  ModInt operator/(const ModInt &p) const { return ModInt(*this) /= p; }

  bool operator==(const ModInt &p) const { return x == p.x; }

  bool operator!=(const ModInt &p) const { return x != p.x; }

  ModInt inverse() const {
      int a = x, b = mod, u = 1, v = 0, t;
      while(b > 0) {
          t = a / b;
          swap(a -= t * b, b);
          swap(u -= t * v, v);
      }
      return ModInt(u);
  }

  ModInt pow(int64_t n) const {
      ModInt ret(1), mul(x);
      while(n > 0) {
          if(n & 1) ret *= mul;
          mul *= mul;
          n >>= 1;
      }
      return ret;
  }

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

  friend istream &operator>>(istream &is, ModInt &a) {
      int64_t t;
      is >> t;
      a = ModInt< mod >(t);
      return (is);
  }

  static int get_mod() { return mod; }
};

using modint = ModInt< MOD >;

map<ll, ll> PrimeFactor(ll n) {
    map<ll, ll> res;
    for(ll i = 2; i * i <= n; ++i) {
        while(n % i == 0) {
            ++res[i];
            n /= i;
        }
        if(LLINF / i <= i) { break; }  // オーバーフロー警察
    }
    if(n != 1) { res[n] = 1; }
    return res;
}

ll N;
vector<ll> A;
map<ll, ll> cnt;    // key: 素数 , val: key がある数

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

    cin >> N;
    A.resize(N);

    REP(i, N) {
        cin >> A[i];
        auto res = PrimeFactor(A[i]);
        for(auto kv : res) {
            ll cur = cnt[kv.first];
            cnt[kv.first] = max(cur, kv.second);
        }
    }

    modint ab = 1;
    for(auto kv : cnt) {
        modint val = kv.first;
        ab *= val.pow(kv.second);
    }

    modint ans = 0;
    REP(i, N) {
        ans += (ab / modint(A[i]));
    }

    printf("%lld\n", ans.x);

    return 0;
}


Measured memory_bytes: 1024