#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  return b == 0 ? a : gcd(b, a % b);
}
long long int lcm(long long int a, long long int b) {
  return (a * b) / gcd(a, b);
}
long long int ncr(long long int n, long long int k) {
  long long int res = 1;
  if (k > n - k) k = n - k;
  for (long long int i = 0; i < k; ++i) {
    res *= (n - i);
    res /= (i + 1);
  }
  return res;
}
long long int fibonacci(long long int n) {
  double phi = (1 + sqrt(5)) / (double)2;
  long long int nth_fib = round(pow(phi, n) / sqrt(5));
  return nth_fib;
}
template <typename K, typename V>
long long int erase_if(std::map<K, V>& mapOfElemen, V value) {
  long long int totalDeletedElements = 0;
  auto it = mapOfElemen.begin();
  while (it != mapOfElemen.end()) {
    if (it->second == value) {
      totalDeletedElements++;
      it = mapOfElemen.erase(it);
    } else {
      it++;
    }
  }
  return totalDeletedElements;
}
long long int lcm_matrices[100000];
long long int Pow(long long int x,
                  long long int y = (long long int)(1e9 + 7) - 2) {
  long long int ans = 1;
  for (; y; y >>= 1, x = x * x % (long long int)(1e9 + 7))
    if (y & 1) ans = ans * x % (long long int)(1e9 + 7);
  return ans;
}
long long int modInverse(long long int a) {
  return pow(a, (long long int)(1e9 + 7));
}
void solve(long long int n) {
  long long int num = 2;
  while (n > 1) {
    long long int cnt = 0;
    while (n % num == 0) {
      cnt++;
      n /= num;
    }
    if (lcm_matrices[num] < cnt) {
      lcm_matrices[num] = cnt;
    }
    num++;
    cout << "cnt =  " << cnt << '\n';
    cout << "n = " << n << " num = " << num << '\n';
  }
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int n;
  cin >> n;
  long long int a[n];
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
  }
  memset(lcm_matrices, 0, sizeof(lcm_matrices));
  for (long long int i = 0; i < n; i++) {
    solve(a[i]);
  }
  long long int mul = 1;
  for (long long int i = 2; i < 100000; i++) {
    mul = ((((mul) % (long long int)(1e9 + 7)) *
            ((long long int)pow(i, lcm_matrices[i])) %
            (long long int)(1e9 + 7))) %
          (long long int)(1e9 + 7);
  }
  cout << "mul = " << mul << '\n';
  cout << "lcm = "
       << (lcm(lcm(1000000, 999999), 999998)) % (long long int)(1e9 + 7)
       << '\n';
  ;
  long long int ans = 0;
  for (long long int i = 0; i < n; i++) {
    ans += (((mul) % (long long int)(1e9 + 7)) *
            (Pow(a[i]) % (long long int)(1e9 + 7))) %
           (long long int)(1e9 + 7);
  }
  cout << ans;
  return 0;
}
