import Data.List import Control.Monad main = print =<< (maximum . map length . filter (isPrefixOf "o") . group . concat <$> replicateM 2 getLine)