main :: IO ()
main = do
    let m = 1000000007

    n <- readLn :: IO Int
    as <- map read . words <$> getLine :: IO [Integer]
    let l = foldl1 lcm as
    let ans = sum $ map (\a -> (l `div` a) `mod` m) as
    print $ ans `mod` m
