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

#define Omar45 ios_base::sync_with_stdio(false); cin.tie(NULL);
#define ll long long
#define pb push_back
#define endl '\n'
#define mod 1000000007

ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}

ll findlcm(ll arr[], ll n)
{
    ll ans = arr[0];

    for (int i = 1; i < n; i++)
        ans = (((arr[i] * ans)) /
                (gcd(arr[i], ans)));

    return ans;
}

int main() {
	Omar45
    ll N; cin >> N;
    ll arr1[N], res=0;
    for (int i=0; i<N; i++)
        cin >> arr1[i];
    ll n = sizeof(arr1) / sizeof(arr1[0]);
    ll LCM = findlcm(arr1, n);
    //cout << LCM << endl;
    for (int i=0; i<N; i++) {
        res = (res%mod + (LCM/arr1[i])%mod) % mod;
    }
    cout << res << endl;
}
