using System; namespace yukicoder { class Program { static void Main(string[] args) { var str = Console.ReadLine(); var str2 = Console.ReadLine(); int temp = 0; string[] strings = new string[str.Length + str.Length]; int vacation = 1, Maxvacation = 0; for(int i = 0; i < str.Length; i++) { strings[i] = str.Substring(i , 1); strings[i + 7] = str2.Substring(i, 1); } for (int j = 0; j < strings.Length - 1; j++) { if (strings[j] == "o" && strings[j + 1] == "o") { vacation++; } else { temp = vacation; if(temp > Maxvacation) { Maxvacation = temp; } vacation = 1; } } if(str == "xxxxxxx" && str2 == "xxxxxxx") { Maxvacation = 0; } Console.WriteLine(Maxvacation); } } }