#include<iostream>
#include<algorithm>
#include<iomanip>
#include<cmath>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<string>
#define Amr_Abdelazim ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define pb push_back
#define pp pop_back
#define ll long long
#define ld long double
#define Mod 1000000007
const int N = 100000;
using namespace std;
ll gcd(ll a, ll b){
	if (b == 0)return a;
	return gcd(b, a%b);
}
int main()
{
	Amr_Abdelazim
		ll n;
	cin >> n;
	vector<ll>v(n);
	for (int i = 0;i < n; i++)cin >> v[i];
	ll lcm = v[0];
	for (int i = 1; i < n; i++){
		lcm = ((v[i] * lcm) / gcd(v[i], lcm));
	}
	ll ans = 0;
	for (auto i : v){
		ll a = lcm / i;
		ans = (ans%Mod + a%Mod) % Mod;
	}
	cout << ans << "\n";
		return 0;
}