main = getContents >>= print . solve . concat . lines solve :: String -> Int solve = fst . foldl ff (0, 0) where ff (m, n) x | x == 'o' = (max m (n + 1), n + 1) | otherwise = (m, 0)