#include <bits/stdc++.h>
using namespace std;

const long long MOD = 1000000007;


// 入力はすべて正とする
// 素数判定O(√n)
bool is_prime(int n) {
    for (int i = 2; i * i <= n; i++) {
        if (n % i == 0) return false;
    }
    return n != 1; // 1の場合は例外
}
// 約数の列挙O(√n)
vector<int> divisor(int n) {
    vector<int> res;
    for (int i = 1; i * i <= n; i++) {
        if (n % i == 0) {
            res.push_back(i);
            if (i != n / i) res.push_back(n / i);
        }
    }
    return res;
}
// 素因数分解O(√n)
map<int, int> prime_factor(int n) {
    map<int, int> res;
    for (int i = 2; i * i <= n; i++) {
        while (n % i == 0) {
            ++res[i];
            n /= i;
        }
    }
    if (n != 1) res[n] = 1;
    return res;
}



template <typename T1, typename T2>
map<T1, T2> pointwiseMap2(map<T1, T2> a, map<T1, T2> b, auto f, T2 def){
    map<T1, T2> res = a;
    for(auto iter: b){
        if(res.find(iter.first) == res.end()){
            res[iter.first] = f(def, iter.second);
        }else{
            res[iter.first] = f(a[iter.first], iter.second);
        }
    }
    return res;
}

template <typename T>
vector<T> pointwiseVector2(vector<T> a, vector<T> b, auto f){
    assert(a.size() == b.size());
    auto res = vector<T>(a.size());
    for(int i=0; i < res.size(); i++){
        res[i] = f(a[i], b[i]);
    }
    return res;
}

struct GCDResult{long long x; long long y; long long res;};
GCDResult gcd(long long a, long long b){
    if(a < 0){
        auto sub = gcd(-a, b);
        return GCDResult{-sub.x, sub.y, sub.res};
    }
    if(b < 0){
        auto sub = gcd(a, -b);
        return GCDResult{sub.x, -sub.y, sub.res};
    }
    if(a < b){
        auto sub = gcd(b, a);
        return GCDResult{sub.y, sub.x, sub.res};
    }
    // a >= b AND a >= 0 AND b >= 0
    if(b == 0){
        return GCDResult{1LL, 0LL, a};
    }
    // a >= b AND a > 0 AND b > 0
    auto sub = gcd(b, a % b);
    return GCDResult{sub.y, sub.x - sub.y*(a/b), sub.res};
}

template <long long p>
class Zp{
    long long content;
    public:
    Zp(long long content_){
        if(content_ >= 0){
            content = content_ % p;
        }else{
            long long temp = p;
            while(temp < -content_){
                temp *= p;
            }
            content = (temp + content_) % p;
        }
    }

    bool operator==(const Zp<p>& rhs) const{
        return this->content == rhs.content;
    }

    bool operator!=(const Zp<p>& rhs) const{
        return !(*this == rhs);
    }

    Zp<p> operator+(const Zp<p>& rhs) const{
        return Zp<p>(this->content + rhs.content);
    }

    Zp<p> operator-() const{
        return Zp<p>(p - this->content);
    }

    Zp<p> operator-(const Zp<p>& rhs) const{
        return Zp<p>(this->content - rhs.content + p);
    }

    Zp<p> operator*(const Zp<p>& rhs) const{
        return Zp<p>(this->content * rhs.content);
    }

    Zp<p> inv() const{
        if(this->content == 0){
            assert(false);
        }

        auto res = gcd(this->content, p);
        return Zp<p>(res.x);
    }

    Zp<p> operator/(const Zp<p>& rhs) const{
        if(rhs.content == 0){
            assert(false);
        }
        
        return (*this)*rhs.inv();
    }

    // static Zp<p> pow(const Zp<p>& x, int n){
    //     Zp<p> res = Zp<p>(1);
    //     Zp<p> mult = x;
    //     while(n > 0){
    //         if(n & 1 == 1){
    //             res = res*mult;
    //         }
    //         n >>= 1;
    //         mult = mult*mult;
    //     }
    //     return res;
    // }

    Zp<p> pow(int n){
        auto res = Zp<p>(1);
        Zp<p> mult = (*this);
        while(n > 0){
            if(n & 1 == 1){
                res = res*mult;
            }
            n >>= 1;
            mult = mult*mult;
        }
        return res;
    }

    long long raw(){
        return this->content;
    }

};




void solve(long long N, std::vector<int> A){
    //// calc rems
    // auto ajprimes = vector<map<int, int>>(N);
    auto lcma = map<int, int>();
    for(int j=0; j < N; j++){
        auto ajprime = prime_factor(A[j]);
        // ajprimes[j] = ajprime;
        for(auto iter: ajprime){
            if(lcma.find(iter.first) == lcma.end()){
                lcma[iter.first] = iter.second;
            }else{
                lcma[iter.first] = max(iter.second, lcma[iter.first]);
            }
        }
    }

    // calc
    Zp<MOD> lcmp = Zp<MOD>(1);
    for(auto iter: lcma){
        lcmp = lcmp*Zp<MOD>(iter.first).pow(iter.second);
    }


    auto res = Zp<MOD>(0);
    for(int i=0; i < N; i++){
        res = res + lcmp/Zp<MOD>(A[i]);
    }
    
    cout << res.raw() << endl;

}

// Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
int main(){
    long long N;
    scanf("%lld",&N);
    std::vector<long long> A(N);
    for(int i = 0 ; i < N ; i++){
        scanf("%lld",&A[i]);
    }
    vector<int> AA(N);
    for(int i=0; i < N; i++){
        AA[i] = A[i];
    }
    solve(N, AA);
    return 0;
}


Measured memory_bytes: 896