import Control.Applicative ((<$>)) main :: IO () main = do solve <$> getLine >>= print solve :: String -> Int solve = length . filter (== 'm')