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

template <std::uint_fast64_t mod>
class ModInt {
    using u64 = std::uint_fast64_t;

   public:
    u64 x;
    ModInt(const ll x = 0) : x(x < 0 ? (mod - (-x % mod)) % mod : x % mod) {}

    ModInt operator+(const ModInt r) { return ModInt(*this) += r; }
    ModInt operator*(const ModInt r) { return ModInt(*this) *= r; }
    ModInt operator-(const ModInt r) { return ModInt(*this) -= r; }
    ModInt operator/(const ModInt r) { return ModInt(*this) /= r; }
    ModInt operator-() { return ModInt(mod - x); }

    ModInt &operator+=(const ModInt r) {
        x += r.x;
        if (x >= mod) x -= mod;
        return *this;
    }
    ModInt &operator-=(const ModInt r) {
        if (x < r.x) x += mod;
        x -= r.x;
        return *this;
    }
    ModInt &operator*=(const ModInt r) {
        x *= r.x;
        if (x >= mod) x %= mod;
        return *this;
    }
    ModInt &operator/=(ModInt r) {
        if (!(x % r.x)) {
            x /= r.x;
            return *this;
        }
        u64 p = mod - 2;
        while (p > 0) {
            if (p & 1) *this *= r;
            r *= r;
            p >>= 1;
        }
        return *this;
    }
    ModInt &operator++(int) { return (*this) += 1; }
    ModInt &operator++() { return (*this) += 1; }
    ModInt &operator--(int) { return (*this) -= 1; }
    ModInt &operator--() { return (*this) -= 1; }

    bool operator<(const ModInt r) { return x < r.x; }
    bool operator>(const ModInt r) { return x > r.x; }
    bool operator<=(const ModInt r) { return x <= r.x; }
    bool operator>=(const ModInt r) { return x >= r.x; }
    bool operator==(const ModInt r) { return x == r.x; }
    bool operator!=(const ModInt r) { return x != r.x; }

    ModInt inv() { return (ModInt)1 / (*this); }
    int get_mod() { return mod; }

    friend std::istream &operator>>(std::istream &in, ModInt &m) {
        int a;
        in >> a;
        if (a < 0) a = mod - (-a % mod);
        if (a >= mod) a %= mod;
        m.x = a;
        return in;
    }
    friend std::ostream &operator<<(std::ostream &out, const ModInt &m) {
        out << m.x;
        return out;
    }
};
constexpr std::uint_fast64_t mod = 1000000007;
using mint = ModInt<mod>;

map<ll, ll> p;
void factoring(ll n, map<ll, ll> &pfac) {
    ll upper = (ll)sqrt(n);
    for (ll i = 2; i <= upper; i++) {
        while (n % i == 0) {
            n /= i;
            pfac[i]++;
        }
    }
    if (n > 1) pfac[n]++;
    for (auto ite = pfac.begin(); ite != pfac.end(); ++ite) {
        p[ite->first] = max(p[ite->first], ite->second);
    }
}

template <typename T, typename U>
T pow(T x, U n) {
    T res = 1;
    while (n > 0) {
        if (n & 1) res *= x;
        x *= x;
        n >>= 1;
    }
    return res;
}

int main() {
    int n;
    cin >> n;
    vector<ll> a(n);
    vector<map<ll, ll>> mp(n);
    for (int i = 0; i < n; i++) {
        cin >> a[i];
        factoring(a[i], mp[i]);
    }
    mint l = 1;
    for (auto ite = p.begin(); ite != p.end(); ++ite) {
        l *= pow<mint, ll>(mint(ite->first), ite->second);
    }
    mint ans = 0;
    vector<mint> b(n);
    for (int i = 0; i < n; i++) {
        b[i] = mint(l / a[i]);
    }
    for (int i = 0; i < n; i++) {
        ans += b[i];
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 3968