#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ULL;
typedef unordered_map<ULL, ULL> umap;
#define REP(i, n) for(int i=0; i<(int)(n); i++)
const int MOD=1e9+7;
ULL pw(ULL a, ULL n){ ULL b=1; while(n){ if(n&1){ b=(b*a)%MOD; } a=(a*a)%MOD; n>>=1; } return b; }
umap to_umap(ULL n){
  umap U;
  while(n%2==0){ U[2]++; n>>=1; }
  for(ULL k=3; k*k<=n; k+=2){ while(n%k==0){ U[k]++; n/=k; } }
  if(n>1){ U[n]=1; }
  return U;
}
ULL to_ULL(umap &U){
  ULL n=1;
  for(auto p:U){ n=(n*pw(p.first, p.second))%MOD; }
  return n;
}
umap LCM(vector<umap> &V){
  umap U;
  REP(i, V.size()){ for(auto p:V[i]){ U[p.first]=max(U[p.first], p.second); } }
  return U;
}
int main(){
  int N; cin >> N; ULL A[N], L, x=0; vector<umap> VA; umap VL;
  REP(i, N){ cin >> A[i]; VA.push_back(to_umap(A[i])); }
  VL=LCM(VA); L=to_ULL(VL);
  REP(i, N){ x=(x+(L*pw(A[i], MOD-2))%MOD)%MOD; }
  cout << x << "\n";
}