maxLCM (a:b:xs) = maxLCM ([lcm a b] ++ xs)
maxLCM (a:[]) = a

sumAs as =
  let mx = maxLCM as
  in foldl (+) 0 . map (div mx) $ as

dived as =
  let mx = maxLCM as
  in map (div mx) $ as

main = do
  n <- getLine
  as <- (map read . words) <$> getLine
  print . flip mod 1000000007 . sumAs $ as