#include <iostream>
#include <vector>
#include <map>
#include <cmath>

namespace cplib {
    template <typename T>
    std::map<T, int> factorize(T n) {
        T lim = std::ceil(std::sqrt((double)n)) + 10;
        T div = 2;
        std::map<T, int> res;
        while (n > 1 && div <= lim) {
            if (n % div == 0) {
                res[div]++;
                n /= div;
            } else {
                div++;
            }
        }
        if (n > 1) {
            res[n]++;
        }
        return res;
    }

    template <int64_t mod>
    class ModInt {
        public:
        int64_t val;

        ModInt(): val(0) {}
        ModInt(int64_t init_val): val(
            init_val >= 0? init_val % mod: mod - (-init_val) % mod
        ) {}

        bool operator !() {return val != 0;}
        ModInt operator -() {return ModInt(-val);}
        bool operator ==(ModInt rhs) {return val == rhs.val;}
        bool operator !=(ModInt rhs) {return val != rhs.val;}

        ModInt& operator ++() {
            val++;
            if (val == mod) val = 0;
            return *this;
        }
        ModInt operator ++(int) {
            ModInt res = *this;
            val++;
            if (val == mod) val = 0;
            return res;
        }
        ModInt& operator --() {
            if (val == 0) val = mod;
            val--;
            return *this;
        }
        ModInt operator --(int) {
            ModInt res = *this;
            if (val == 0) val = mod;
            val--;
            return res;
        }

        ModInt& operator +=(ModInt rhs) {
            val += rhs.val;
            if (val >= mod) val -= mod;
            return *this;
        }
        ModInt& operator -=(ModInt rhs) {
            val -= rhs.val;
            if (val < 0) val += mod;
            return *this;
        }
        ModInt& operator *=(ModInt rhs) {
            val = (val * rhs.val) % mod;
            return *this;
        }
        ModInt& operator /=(ModInt rhs) {
            int64_t base = rhs.val, res = 1, pow = mod - 2;
            while (pow > 0) {
                if (pow % 2 == 1) res = (res * base) % mod;
                base = (base * base) % mod;
                pow /= 2;
            }
            val = (val * res) % mod;
            return *this;
        }

        ModInt operator +(ModInt rhs) {return ModInt(*this) += rhs;}
        ModInt operator -(ModInt rhs) {return ModInt(*this) -= rhs;}
        ModInt operator *(ModInt rhs) {return ModInt(*this) *= rhs;}
        ModInt operator /(ModInt rhs) {return ModInt(*this) /= rhs;}

        friend std::istream& operator >>(std::istream& is, ModInt& target) {
            int64_t init_val;
            is >> init_val;
            target = ModInt(init_val);
            return is;
        }
        friend std::ostream& operator <<(std::ostream& os, ModInt source) {
            os << source.val;
            return os;
        }
    };

    template <typename T, typename U>
    T pow(T m, U n) {
        T res = 1;
        while (n > 0) {
            if (n % 2 == 1) {
                res *= m;
            }
            m *= m;
            n /= 2;
        }
        return res;
    }
}

int main() {
    int n;
    std::cin >> n;
    std::vector<int> a(n);
    for (int i = 0; i < n; i++) {
        std::cin >> a[i];
    }

    std::map<int, int> num;
    for (int i = 0; i < n; i++) {
        auto numi = cplib::factorize(a[i]);
        for (auto p: numi) {
            num[p.first] = std::max(num[p.first], p.second);
        }
    }

    using mint = cplib::ModInt<1000000007>;
    mint lcm = 1;
    for (auto p: num) {
        lcm *= cplib::pow((mint)p.first, p.second);
    }

    mint ans = 0;
    for (int i = 0; i < n; i++) {
        ans += lcm / a[i];
    }

    std::cout << ans << std::endl;
    return 0;
}


Measured memory_bytes: 768