#include <bits/stdc++.h>

#ifdef _DEBUG
#define debug(x) cerr << "line: " << __LINE__ << ", func: " << __func__ << " ->  " << #x << " = " << x << endl
#else
#define debug(x)
#endif

#define all(s) begin(s), end(s)
#define rall(s) rbegin(s), rend(s)
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define rrep(i, a, b) for (int i = ((a)-1); i >= (b); i--)
#define pb push_back
#define sz(a) int((a).size())
#define put(a) ((cout) << (a) << (endl))
#define putf(a, n) ((cout) << (fixed) << (setprecision(n)) << (a) << (endl))
#define deg2rad(x) (((x)*PI) / (180.0))
#define rad2deg(x) (((x) * (180.0)) / PI)
#define fi first
#define se second
#define F first
#define S second
#define MAX 10000003

using namespace std;

using ll = long long;
using ull = unsigned long long;
using ld = long double;
using i_i = pair<int, int>;
using ll_ll = pair<ll, ll>;
using d_ll = pair<double, ll>;
using ll_d = pair<ll, double>;
using d_d = pair<double, double>;
template <class T> using vec = vector<T>;

static constexpr ll LL_INF = 1LL << 60;
static constexpr int I_INF = 1 << 28;
static constexpr double PI = static_cast<double>(3.14159265358979323846264338327950288);
static constexpr double EPS = numeric_limits<double>::epsilon();
static constexpr ll MOD = 1000000007;

static map<type_index, const char* const> scanType = {
    {typeid(int), "%d"}, {typeid(ll), "%lld"}, {typeid(double), "%lf"}, {typeid(char), "%c"}};

const int mod = 1000000007;

int prime[MAX];
unordered_map<int, int> max_map;

// Function to return a^n
int power(int a, int n) {
  if (n == 0) return 1;
  int p = power(a, n / 2) % mod;
  p = (p * p) % mod;
  if (n & 1) p = (p * a) % mod;
  return p;
}

// Function to find the smallest prime factors
// of numbers upto MAX
void sieve() {
  prime[0] = prime[1] = 1;
  for (int i = 2; i < MAX; i++) {
    if (prime[i] == 0) {
      for (int j = i * 2; j < MAX; j += i) {
        if (prime[j] == 0) {
          prime[j] = i;
        }
      }
      prime[i] = i;
    }
  }
}

// Function to return the LCM modulo M
ll lcmModuloM(vec<ll>& ar, int n) {
  for (int i = 0; i < n; i++) {
    int num = ar[i];
    unordered_map<int, int> temp;

    // Temp stores mapping of prime factor to
    // its power for the current element
    while (num > 1) {
      // Factor is the smallest prime factor of num
      int factor = prime[num];

      // Increase count of factor in temp
      temp[factor]++;

      // Reduce num by its prime factor
      num /= factor;
    }

    for (auto it : temp) {
      // Store the highest power of every prime
      // found till now in a new map max_map
      max_map[it.first] = max(max_map[it.first], it.second);
    }
  }

  ll ans = 1;

  for (auto it : max_map) {
    // LCM is product of primes to their highest powers modulo M
    ans = (ans * power(it.F, it.S)) % mod;
  }

  return ans;
}

ll modinv(ll a, ll p) {
  ll b = p, u = 1, v = 0;
  while (b) {
    ll t = a / b;
    a -= t * b;
    swap(a, b);
    u -= t * v;
    swap(u, v);
  }

  u %= p;
  if (u < 0) u += p;
  return u;
}

int main(int argc, char* argv[]) {
  long long N;
  scanf("%lld", &N);
  std::vector<long long> A(N);
  for (int i = 0; i < N; i++) {
    scanf("%lld", &A[i]);
  }

  sieve();
  ll ans = 0;
  ll l = lcmModuloM(A, N);

  rep(i, 0, N) {
    ans += (l * modinv(A[i], MOD)) % MOD;
    ans %= MOD;
  }

  put(ans);
  return 0;
}


Measured memory_bytes: 39808