using System; namespace yukicoder { class Program { static void Main(string[] args) { string s = Console.ReadLine(); string s1 = Console.ReadLine(); int count = 0; int ans = 0; string a = ""; for (int i = 0; i < 2; i++) { for (int j = 0; j < 7; j++) { if (i == 0) { a = s.Substring(j, 1); } else { a = s1.Substring(j, 1); } if (a == "o") { count++; } if (a == "x") { if (count > ans) { ans = count; } count = 0; } if (j == 6) { if (count > ans) { ans = count; } break; } } } Console.WriteLine(ans); } } }