import math._ object Main { def gcd(a: Int, b: Int): Int = { if (b == 0) a else gcd(b, a % b) } def calc(xs: Array[Int]): Int = { if (xs.length == 1) return 1 val g = xs.reduceLeft((a, b) => gcd(a, b)) xs.map(_ / g).sum } def main(args: Array[String]) { val sc = new java.util.Scanner(System.in) val n = sc.nextInt val xs = Array.fill(n)(sc.nextInt) println(calc(xs)) } }