main = do str <- getLine print $ length $ filter (== 'm') str