import           Control.Monad
import qualified Data.ByteString.Char8 as BS
import           Data.Char
import           Data.Maybe
import qualified Data.Vector.Unboxed   as V

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine

getIntVec n = V.unfoldrN n (BS.readInt . BS.dropWhile isSpace) <$> BS.getLine

main = do
  n <- getInt
  as <- getIntVec n
  let m = V.foldr lcm 1 as
      as' = V.map (\i -> m `div` i) as
      ans = V.foldr (\i j -> (i + j) `mod` 1000000007) 0 as'
  print ans