-- 最小公倍数を取って割って和の余り

solve :: [Integer] -> Integer
solve numbers =
  let
    numbersLcm = foldr1 lcm numbers
  in
    (sum $ map (\a -> numbersLcm `div` a) numbers) `mod` 1000000007

main = do
  count <- getLine
  numbers <- (map read . words) <$> getLine
  putStrLn $ show $ solve numbers
