{-# LANGUAGE OverloadedStrings #-} import qualified Data.ByteString.Char8 as C main :: IO () main = do ss <- C.getLine print $ C.count 'm' ss