object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val n = sc.nextInt
  val seq = Seq.fill(n)(sc.nextLong)
  
  def gcd(a: Long, b: Long): Long = {
    if (b == 0) a
    else gcd(b, a % b)
  }
  def lcm(a: Long, b: Long): Long = a * b / gcd(a, b)
  def multiLcm(seq: Seq[Long]): Long = seq.reduce(lcm)
  
  val LCM = multiLcm(seq)
  val sum = seq.map(i => (LCM / i).toLong).sum
  println(sum % 1000000007)
}