main = do
  n <- readLn :: IO Int
  as <- map read . words <$> getLine :: IO [Integer]
  putStrLn $ show $ sumInvMod p as $ lcmMod p as
      where p = 1000000007

sumInvMod :: Integer -> [Integer] -> Integer -> Integer
sumInvMod p as y = foldl step 0 as
    where step a x = addMod p a $ mulMod p y $ invMod p x

lcmMod :: Integer -> [Integer] -> Integer
lcmMod p as = mod (foldl lcm 1 as) p

addMod :: Integer -> Integer -> Integer -> Integer
addMod p x y = mod (x + y) p

mulMod :: Integer -> Integer -> Integer -> Integer
mulMod p x y = mod (x * y) p

invMod :: Integer -> Integer -> Integer
invMod p x = mod (xgcd p x !! 2) p

xgcd :: Integer -> Integer -> [Integer]
xgcd a b
    | a < b     = xgcdRec [0, 1, 1, 0] b a
    | otherwise = xgcdRec [1, 0, 0, 1] a b
    where xgcdRec m a 0 = a: m
          xgcdRec [x0, y0, x1, y1] a b = let d = div a b in xgcdRec [x1, y1, x0 - d * x1, y0 - d * y1] b (mod a b)
