#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define A first
#define B second
#define mod 1000000007
ll GCD(ll a, ll b) {
    if(b==0)
        return a;
    else
        return GCD(b, a%b);
}
ll LCM(ll a, ll b){
    return (a*b)/GCD(a,b) % mod;
}
int main() {
    ll num;
    cin>>num;
    vector<ll> arr(num);
    for (int i = 0; i < num; ++i) {
        cin>>arr[i];
    }
    ll result = arr[0];
    for (int i = 1; i < num; ++i) {
        result = lcm(arr[i], result);
    }
    ll sum = 0;
    for (int i = 0; i < num; ++i) {
        sum = ( sum + (result / arr[i]))% mod;
    }
    cout<<sum;
}