import Control.Applicative

main :: IO ()
main = do
    n <- readLn :: IO Int
    a <- (map read) . words <$> getLine
    let aLcm = foldr lcm 1 a
    print $ mod (sum $ map (\x -> div aLcm x) a) 1000000007
