using System; public class Program { public static void Main() { //int num = int.Parse(Console.ReadLine() ?? string.Empty); //string[] str = (Console.ReadLine() ?? string.Empty).Trim().Split(' '); string str = Console.ReadLine() ?? string.Empty; string str2 = Console.ReadLine() ?? string.Empty; int count = 0; int count2 = 0; string s = str + str2; for (int i = 0; i < s.Length; i++) { if (s[i] == 'o') { count++; } else if (s[i] == 'x' && count >= 1 && count2 < count) { count2 = count; count = 0; } else { count = 0; } } if (count >= 1 && count2 < count) { count2 = count; } Console.WriteLine(count2); } }