#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <math.h>
#include <complex>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <unordered_map>
#include <set>
#include <bitset>
#include <functional>
#include <assert.h>
#define int long
#define ll long long
#define rng(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,b) rng(i,0,b)
#define gnr(i,a,b) for(int i=int(b)-1;i>=int(a);i--)
#define per(i,b) gnr(i,0,b)
#define eb emplace_back
#define all(x) x.begin(),x.end()
#define SZ(x) x.size()
#define fi first
#define se second
const int INF = 1e9;
using namespace std;

template<class t> using vc=vector<t>;
template<class t> using vvc=vc<vc<t>>;

using pi=pair<int,int>;
using vi=vc<int>;

template<class T>
inline bool chmax(T &a,T b){if(a<b){a=b;return true;}return false;}
template<class T>
inline bool chmin(T &a,T b){if(a>b){a=b;return true;}return false;}

const int mod = 1000000007;
const int MAX = 1000003;

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(const int* ar, int n) 
{ 

  for (int i = 0; i < n; i++) { 
    int num = ar[i]; 
    unordered_map<int, int> temp; 

    while (num > 1) { 
      int factor = prime[num]; 
      temp[factor]++; 
      num /= factor; 
    } 

    for (auto it : temp) { 
      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.fi, it.se)) % mod; 
  } 

  return ans; 
}

template <ll Modulus> class modint {
  using u64 = ll;

public:
  u64 a;

  constexpr modint(const u64 x = 0) noexcept : a(x % Modulus) {}
  constexpr u64 &value() noexcept { return a; }
  constexpr const u64 &value() const noexcept { return a; }
  constexpr modint operator+(const modint rhs) const noexcept {
    return modint(*this) += rhs;
  }
  constexpr modint operator-(const modint rhs) const noexcept {
    return modint(*this) -= rhs;
  }
  constexpr modint operator*(const modint rhs) const noexcept {
    return modint(*this) *= rhs;
  }
  constexpr modint operator/(const modint rhs) const noexcept {
    return modint(*this) /= rhs;
  }
  constexpr modint &operator+=(const modint rhs) noexcept {
    a += rhs.a;
    if (a >= Modulus) {
      a -= Modulus;
    }
    return *this;
  }
  constexpr modint &operator-=(const modint rhs) noexcept {
    if (a < rhs.a) {
      a += Modulus;
    }
    a -= rhs.a;
    return *this;
  }
  constexpr modint &operator*=(const modint rhs) noexcept {
    a = a * rhs.a % Modulus;
    return *this;
  }
  constexpr modint &operator/=(modint rhs) noexcept {
    u64 exp = Modulus - 2;
    while (exp) {
      if (exp % 2) {
        *this *= rhs;
      }
      rhs *= rhs;
      exp /= 2;
    }
    return *this;
  }
};

signed main(){
  using mint = modint<mod>;
  sieve();
  int n;
  mint l=1,r=0;
  cin>>n;
  int a[10010];
  for(int i=0;i<n;++i)cin>>a[i];
  l=lcmModuloM(a,n);
  for(int i=0;i<n;++i)r+=l/a[i];
  cout << r.a << endl;
}


Measured memory_bytes: 8576