import Data.List import Control.Monad main = do c <- concat <$> replicateM 2 getLine print $ maximum $ map length $ unfoldr (\xs -> if null xs then Nothing else let y = takeWhile (/='x') xs in Just (y, drop (length $ if null y then takeWhile (/='o') xs else y) xs)) c