#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, N) for (int i = 0; i < (int)N; ++i)
#define all(a) (a).begin(), (a).end()
class ModInt {
  static int MOD;
  long long x;

 public:
  static void mod(int m) { MOD = m; }

  ModInt(long long v = 0) : x(v % MOD) {
    if (x < 0) x += MOD;
  }

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

  ModInt& operator-=(const ModInt& r) {
    x -= r.x;
    if (x < 0) x += MOD;
    return *this;
  }
  ModInt& operator*=(const ModInt& r) {
    x = (x * r.x) % MOD;
    return *this;
  }
  ModInt& operator/=(const ModInt& r) {
    *this *= r.inverse();
    return *this;
  }

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

  ModInt operator+(const ModInt& r) const { return ModInt(*this) += r; }
  ModInt operator-(const ModInt& r) const { return ModInt(*this) -= r; }
  ModInt operator*(const ModInt& r) const { return ModInt(*this) *= r; }
  ModInt operator/(const ModInt& r) const { return ModInt(*this) /= r; }
  bool operator==(const ModInt& r) const { return x == r.x; }
  bool operator!=(const ModInt& r) const { return x != r.x; }

  ModInt inverse() const {
    long long 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(long long 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& x) { return os << x.x; }

  friend istream& operator>>(istream& is, ModInt& x) { return is >> x.x; }

  int getMod() { return MOD; }

  long long val() { return x; }
};
int ModInt::MOD = 1000000007;
class PrimeTable {
  int N;
  vector<int> factor;

 public:
  vector<int> primes;
  PrimeTable(int N) : N(N), factor(N + 1, 0) {
    factor[0] = factor[1] = -1;
    for (long long i = 2; i <= N; ++i) {
      if (factor[i]) continue;
      primes.push_back(i);
      factor[i] = i;
      for (long long j = i * i; j <= N; j += i)
        if (!factor[j]) factor[j] = i;
    }
  }

  bool isPrime(int k) { return factor[k] == k; }

  unordered_map<int, int> factorize(int k) {
    assert(k <= N);
    unordered_map<int, int> res;
    while (k != 1) {
      res[factor[k]] += 1;
      k /= factor[k];
    }
    return res;
  }
};

class Prime {
 public:
  class Factor {
   public:
    long long p, r;
  };

  static vector<Factor> factorize(long long n) {
    vector<Factor> res;
    long long m = n;
    for (long long i = 2; i * i <= m; i++) {
      if (m % i) continue;
      Factor f = Factor{i, 0};
      while (m % i == 0) {
        m /= i;
        f.r++;
      }
      res.push_back(f);
    }
    if (m != 1) {
      res.push_back(Factor{m, 1});
    }
    return res;
  }
};

int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  rep(i, N) cin >> A[i];

  PrimeTable t(*max_element(all(A)));
  unordered_map<int, int> lcm;
  rep(i, N) {
    auto facts = t.factorize(A[i]);
    for (auto it = facts.begin(); it != facts.end(); it++) {
      lcm[it->first] = max(lcm[it->first], it->second);
    }
  }

  ModInt m = 1;
  for (auto it = lcm.begin(); it != lcm.end(); it++) {
    m *= ModInt(it->first).pow(it->second);
  }

  ModInt ans = 0;
  rep(i, N) ans += m / A[i];

  cout << ans << endl;

  return 0;
}


Measured memory_bytes: 4988