import std.stdio, std.conv, std.string, std.algorithm,
       std.math, std.array, std.container, std.typecons;
import std.numeric;

long mod = 1000000007;

long inv(long a) {
  long b=mod, u=1, v=0;
  while(b>0) {
    long t = a/b;
    a -= t*b; swap(a, b);
    u -= t*v; swap(u, v);
  }
  u %= mod;
  if(u<0) u += mod;
  return u;
}

void main() {
  long n = readln.chomp.to!long;
  long[] a = readln.chomp.split.to!(long[]);
  long LCM = a.fold!((x,y) => (x / gcd(x,y) * y) % mod);
  long result = 0;
  for(int i=0; i<n; i++) {
    long bi = LCM * inv(a[i]);
    result += bi;
    result %= mod;
  }
  result.writeln;
}

