#include <bits/stdc++.h>

#define REP(i,n) for (int i=0;i<(n);++i)
#define MOD 1000000007

using namespace std;

using ull = unsigned long long;

template <class T, T M>
class modulo {
public:
    T data;

    modulo(T data = 0) : data(data % M) {
    }

    modulo operator+(const modulo &x) const {
        return modulo(data + x.data);
    }

    modulo operator-(const modulo &x) const {
        return modulo(data + (M - x.data));
    }

    modulo operator*(const modulo &x) const {
        return modulo(data * x.data);
    }

    modulo operator/(const modulo &x) const {
        return modulo(data * x.inv().data);
    }

    modulo operator+=(const modulo &x) {
        return data = (data + x.data) % M;
    }

    modulo operator-=(const modulo &x) {
        return data = (data + (M - x.data)) % M;
    }

    modulo operator*=(const modulo &x) {
        return data = (data * x.data) % M;
    }

    modulo operator/=(const modulo &x) {
        return data = (data * x.inv().data) % M;
    }

    modulo inv() const {
        return _pow(M - 2);
    }

    template <class Integer>
    modulo operator^(Integer n) const {
        if (n >= 0) {
            return _pow(n);
        } else {
            return _pow(M - 1 - (-n) % (M - 1));
        }
    }

    friend std::ostream& operator<<(std::ostream &os, const modulo &x) {
        os << x.data;
        return os;
    }

private:
    template <class NonNegativeInteger>
    modulo _pow(NonNegativeInteger n) const {
        modulo result(1);
        modulo x(*this);
        while (n) {
            if (n & 1) {
                result *= x;
            }
            x *= x;
            n >>= 1;
        }
        return result;
    }
};

vector<ull> primes_less_than(ull n) {
    vector<ull> primes{ 2 };
    for (ull m = 3; m < n; m += 2) {
        bool is_prime = true;
        for (int p: primes) {
            if (m % p == 0) {
                is_prime = false;
                break;
            }
        }
        if (is_prime) {
            primes.push_back(m);
        }
    }
    return primes;
}

auto primes = primes_less_than(1050);

using Factor = map<ull, size_t>;

template <class Integer>
Factor least_common_multiple(const vector<Integer> &v) {
    Factor factor;
    for (ull n: v) {
        for (ull p: primes) {
            if (p * p > n) break;
            size_t e = 0;
            while (n % p == 0) {
                n /= p;
                e++;
            }
            if (e && factor[p] < e) {
                factor[p] = e;
            }
        }
        if (n > 1) {
            if (!factor.count(n)) {
                factor[n] = 1;
            }
        }
    }
    return factor;
}

Factor div(Factor &factor1, Factor &factor2) {
    Factor factor;
    for (auto p_e: factor1) {
        ull p;
        size_t e1;
        tie(p, e1) = p_e;
        if (factor2.count(p)) {
            size_t e2 = factor2[p];
            assert(e1 >= e2);
            size_t e = e1 - e2;
            if (e > 0)
                factor[p] = e;
        } else {
            factor[p] = e1;
        }
    }
    return factor;
}

template <class Mod>
Mod factor_to_mod(const Factor &factor) {
    Mod result = 1;
    for (auto &p_e: factor) {
        ull p;
        size_t e;
        tie(p, e) = p_e;
        result *= Mod(p) ^ e;
    }
    return result;
}

int main() {
    using mod = modulo<ull, MOD>;

    cin.tie(0);
    ios::sync_with_stdio(false);

    int N;
    cin >> N;
    vector<int> A(N);
    REP(i, N) cin >> A[i];

    mod lcm = factor_to_mod<mod>(least_common_multiple(A));

    mod result = 0;

    REP(i, N) {
        result += lcm / A[i];
    }

    cout << result << endl;

    return 0;
}

Measured memory_bytes: 896