#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
//#define int long long
template<typename T> inline bool chmax(T& a,T b) { if (a < b) { a = b; return true; } return false; }
template<typename T> inline bool chmin(T& a,T b) { if (a > b) { a = b; return true; } return false; }
const int MOD = 1e9+7;

long long modpow(long long x, long long n, long long m = 1e9+7) {
    if (n == 0) return 1;
    if (n % 2 == 1) return (x * modpow(x, n - 1, m)) % m;
    long long t = modpow(x, n / 2, m);
    return (t * t) % m;
}

template<int mod> struct ModInt {
    int x;
    ModInt() : x(0) {}
    ModInt(long long y) : x(y >= 0 ? y % mod : (mod - (-y) % mod) % mod) {}
    ModInt &operator+=(const ModInt &p) { if((x += p.x) >= mod) x -= mod; return *this; }
    ModInt &operator-=(const ModInt &p) { if((x += mod-p.x) >= mod) x -= mod; return *this; }
    ModInt &operator*=(const ModInt &p) { x = (int)(1LL*x*p.x%mod); return *this; }
    ModInt &operator/=(const ModInt &p) { *this *= p.inverse(); return *this; }
    ModInt operator-() const { return ModInt(-x); }
    ModInt operator+(const ModInt &p) const { return ModInt(*this) += p; }
    ModInt operator-(const ModInt &p) const { return ModInt(*this) -= p; }
    ModInt operator*(const ModInt &p) const { return ModInt(*this) *= p; }
    ModInt operator/(const ModInt &p) const { return ModInt(*this) /= p; }
    bool operator==(const ModInt &p) const { return x == p.x; }
    bool operator!=(const ModInt &p) const { return x != p.x; }
    ModInt inverse() const {
        int a = x, b = mod, u = 1, v = 0, t;
        while(b > 0) { t = a/b; a -= t*b; swap(a, b); u -= t*v; swap(u, v); }
        return ModInt(u);
    }
    ModInt pow(int e){
        long long a = 1, p = x;
        while(e > 0) {
            if (e%2 == 0) { p = (p*p)%mod; e /= 2; }
            else { a = (a*p)%mod; e--; }
        }
        return ModInt(a);
    }
    friend ostream &operator<<(ostream &os, const ModInt<mod> &p) {
        return os << p.x;
    }
    friend istream &operator>>(istream &is, ModInt<mod> &a) {
        long long x;
        is >> x;
        a = ModInt<mod>(x);
        return (is);
    }
};

ModInt<MOD> LCMmod(const vector<int> &A) {
    const int N = (int)A.size(); assert(0 < N);
    const int MAX = (int)*max_element(A.begin(), A.end());
    vector<int> prime(MAX+2, 0); 
    prime[0] = prime[1] = false;
    for (int i = 2; i <= MAX; i++) if (!prime[i]) {
        for (int j = i+i; j <= MAX; j += i) if (!prime[j]) {
            prime[j] = i;
        }
        prime[i] = i;
    }
    unordered_map<int, int> mx;
    for (auto num : A) {
        unordered_map<int, int> temp;
        while (num > 1) {
            int factor = prime[num];
            temp[factor]++;
            num /= factor;
        }
        for (auto it : temp) {
            mx[it.first] = max(mx[it.first], it.second);
        }
    }
    ModInt<MOD> ret = 1;
    for (auto it : mx) {
        int res = modpow(it.first, it.second, MOD);
        ret *= res;
    }
    return ret;
}

int main() {
    int N;
    cin >> N;
    vector<int> A(N);
    for (int i = 0; i < N; i++) cin >> A[i];
    ModInt<MOD> LCM = LCMmod(A);
    ModInt<MOD> ans = 0;
    for (int i = 0; i < N; i++) {
        ModInt<MOD> res = LCM;
        res /= (ModInt<MOD>)A[i];
        ans += res;
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 4608