let s = stdin.ReadLine() + stdin.ReadLine() s.Split('x') |> Array.map (fun s -> s.Length) |> Array.max |> printfn "%d"