#include <bits/stdc++.h>

using namespace std;
using i64 = std::int_fast64_t;
using u64 = std::uint_fast64_t;

const int MOD = 1000000007;

int modpow(int x, int n, int mod) {
  int res = 1;
  while (n > 0) {
    if (n & 1) res = 1LL * res * x % mod;
    x = 1LL * x * x % mod;
    n >>= 1;
  }
  return res;
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  map<int, int> primes;
  for (int i = 0; i < N; i++) {
    int x = A[i];
    for (int p = 2; p * p <= A[i]; p++) {
      int cnt = 0;
      while (x % p == 0) {
        x /= p;
        cnt++;
      }
      primes[p] = max(primes[p], cnt);
    }
    if (x > 1) primes[x] = max(primes[x], 1);
  }

  int l = 1;
  for (auto itr : primes) {
    l = 1LL * l * modpow(itr.first, itr.second, MOD) % MOD;
  }
  i64 res = 0;
  for (int i = 0; i < N; i++) {
    res = (res + 1LL * l * modpow(A[i], MOD - 2, MOD)) % MOD;
  }
  cout << res << '\n';
  return 0;
}
