#include<iostream>
#include<vector>
#include<map>
using namespace std;


class ModInt{
private:
  long long val;
  static const int default_mod = 1e9 + 7;
  static int mod;
  static vector<ModInt> facts;
public:
  ModInt(long long val)
  {
    if(mod == 0){
      mod = default_mod;
    }
    this->val = ((val % mod) + mod) % mod;
  }
  ModInt()
    : ModInt(0)
  {
  }
  static void setMod(int mod){
    if(ModInt::mod != 0){
      throw "The modulo is already set.";
    }
    ModInt::mod = mod;
  }

  const ModInt operator* (const ModInt& another) const{
    return ModInt(val * another.val);
  }
  ModInt operator+ (const ModInt& another){
    return ModInt(val + another.val);
  }
  ModInt operator- (const ModInt & another){
    return ModInt(val - another.val + mod);
  }
  ModInt operator/(const ModInt& rhs){
    return (*this) * rhs.inv();
  }
  ModInt& operator*=(const ModInt& rhs){
    (*this) = (*this) * rhs;
    return *this;
  }
  ModInt& operator+=(const ModInt& rhs){
    (*this) = (*this) + rhs;
    return *this;
  }
  ModInt& operator-=(const ModInt& rhs){
    (*this) = (*this) - rhs;
    return *this;
  }
  ModInt pow(long long exponent) const{
    exponent %= mod;
    if(exponent == 0){
      return ModInt(1);
    }else{
      if(exponent % 2){
        return ((*this) * (*this)).pow(exponent / 2) * (*this);
      }else{
        return ((*this) * (*this)).pow(exponent / 2);
      }
    }
  }
  ModInt inv() const{
    return this->pow(mod - 2);
  }
  static ModInt fact(long long n){
    if(n >= mod){
      return 0;
    }
    if(facts.size() < static_cast<size_t>(n + 1)){
      if(facts.size() == 0){
        facts.push_back(1);
      }
      for(int i = facts.size(); i <= n; i++){
        facts.push_back(facts[i - 1] * i);
      }
    }
    return facts[n];
  }
  static ModInt comb(long long n, long long r){
    if(r > n){
      return 0;
    }
    return ModInt::fact(n) * ModInt::fact(r).inv() * ModInt::fact(n - r).inv();
  }
 
  friend ostream& operator<< (ostream& os, const ModInt& modint){
    os << modint.val;
    return os;
  }
  friend istream& operator>>(istream& is, ModInt& modint){
    long long val;
    is >> val;
    modint.val = val % modint.mod;
    return is;
  }
};
int ModInt::mod = 0;
vector<ModInt> ModInt::facts;
const ModInt operator* (const long long lhs, const ModInt& rhs){
  return ModInt(lhs) * rhs;
}

long long gcd(long long a, long long b){
  long long x = max(a, b), y = min(a, b);
  if(y == 0){
    return x;
  }
  return gcd(y, x % y);
}

int main(){
  int N;
  cin >> N;

  vector<int> A(N);
  for(int i = 0; i < N; i++){
    cin >> A[i];
  }

  const long long A_max_sq = 1e3;
  vector<bool> is_prime(A_max_sq + 1, true);
  is_prime[0] = is_prime[1] = false;
  for(int i = 2; i <= A_max_sq; i++){
    if(is_prime[i]){
      for(int j = 2; i * j <= A_max_sq; j++){
        is_prime[i * j] = false;
      }
    }
  }

  vector<int> primes;
  for(int i = 2; i <= A_max_sq; i++){
    if(is_prime[i]){
      primes.push_back(i);
    }
  }
  //cout << primes.size() << endl;

  map<int, int> lcm_fac_cnt;
  for(auto x: A){
    map<int, int> fac_cnt;
    for(auto prime: primes){
      while((x % prime) == 0){
        x /= prime;
        fac_cnt[prime]++;
      }
    }
    if(x != 1){
      fac_cnt[x]++;
    }
    for(auto fac: fac_cnt){
      lcm_fac_cnt[fac.first] = max(lcm_fac_cnt[fac.first], fac.second);
    }
  }

  ModInt product = 1;
  for(auto fac_cnt: lcm_fac_cnt){
    //cout << fac_cnt.first << ' ' << fac_cnt.second << endl;
    for(int i = 0; i < fac_cnt.second; i++){
      product *= fac_cnt.first;
    }
  }

  ModInt ans = 0;
  for(auto x: A){
    ans += product / x;
  }
  cout << ans << endl;
}

  

  


Measured memory_bytes: 888