import Control.Monad
import Control.Applicative

solver :: [Int] -> Int
solver xs = product $ map (\x -> x-1) xs

main :: IO ()
main = do
    line <- (map read) . words <$> getLine
    print $ solver line
