import Control.Applicative import Control.Monad import System.IO main :: IO () main = do n_temp <- getLine let n_t = words n_temp let n = read $ n_t!!0 :: Int let m = read $ n_t!!1 :: Int print (n * m - 1) getMultipleLines :: Int -> IO [String] getMultipleLines n | n <= 0 = return [] | otherwise = do x <- getLine xs <- getMultipleLines (n-1) let ret = (x:xs) return ret