import Control.Applicative ((<$>), (<*>)) import Control.Monad import Data.List main :: IO () main = do solve <$> getLine <*> getLine >>= print solve :: String -> String -> Int solve xs ys = maximum $ scanl' f 0 $ xs ++ ys where f n c = if c == 'o' then n + 1 else 0