/* imports all std modules {{{*/
import
  std.algorithm,
  std.array,
  std.ascii,
  std.base64,
  std.bigint,
  std.bitmanip,
  std.compiler,
  std.complex,
  std.concurrency,
  std.container,
  std.conv,
  std.csv,
  std.datetime,
  std.demangle,
  std.encoding,
  std.exception,
  std.file,
  std.format,
  std.functional,
  std.getopt,
  std.json,
  std.math,
  std.mathspecial,
  std.meta,
  std.mmfile,
  std.net.curl,
  std.net.isemail,
  std.numeric,
  std.parallelism,
  std.path,
  std.process,
  std.random,
  std.range,
  std.regex,
  std.signals,
  std.socket,
  std.stdint,
  std.stdio,
  std.string,
  std.system,
  std.traits,
  std.typecons,
  std.uni,
  std.uri,
  std.utf,
  std.uuid,
  std.variant,
  std.zip,
  std.zlib;
/*}}}*/

/* libmod {{{*/
struct ModCalc(N) if (isIntegral!N) {
 public:
  N mod(N n) const {
    const x = n%m;
    return x < 0? x+m: x;
  }
  N inv(N a) const {
    N b = m, u = 1, v = 0;
    while (b) {
      const t = a / b;
      a -= t*b; swap(a, b);
      u -= t*v; swap(u, v);
    }
    return mod(u);
  }

  N add(N l, N r) const {
    return mod(mod(l) + mod(r));
  }
  N sub(N l, N r) const {
    return mod(mod(l) - mod(r));
  }
  N mul(N l, N r) const {
    return mod(mod(l) * mod(r));
  }
  N div(N l, N r) const {
    assert(r != 0);
    return mod(mod(l) * inv(mod(r)));
  }

  N m = 1000000007;
}
/*}}}*/

/+---test
3
2 3 4
---+/
/+---test
5
12 12 12 12 12
---+/
/+---test
3
1000000 999999 999998
---+/

enum M = ModCalc!long();

BigInt gcdm(BigInt a, BigInt b) {
  if (a < b) swap(a, b);

  auto r = a%b;
  while (r) {
    a = b;
    b = r;
    r = a%b;
  }
  return b;
}

void main(string[] args) {
  const N = readln.chomp.to!long;
  const A = readln.split.map!(to!long).array;

  BigInt z = 1;
  foreach (x; A) {
    z = z / gcdm(BigInt(x), z) * x;
  }

  long ans;
  foreach (x; A) {
    ans = M.add(M.div((z%M.m).to!long, x), ans);
  }
  ans.writeln;
}
