;;abc152_e
(defn gcd [a b]
  (if (zero? b) a (recur b (mod a b))))
(defn lcm [a b]
  (quot (* a b) (gcd a b)))
(defn dual [coll]
  (let [lcm' (reduce lcm coll)]
    (map #(quot lcm' %) coll)))

(defn toNatural [s]
  (map #(bigint %) (.split s " ")))

(read-line)
(def nums (toNatural (read-line)))
(let [M 1000000007 ans (mod (reduce + (dual nums)) M)]
  (println (int ans)))
