using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace yukicoderTest { class Program { static void Main(string[] args) { string input = Console.ReadLine(); string input2 = Console.ReadLine(); string holiday = input + input2; int cnt = 0; int total = 0; for (int i = 0; i < holiday.Length - 1; i++) { string temp = holiday.Substring(i, 1); cnt = 0; bool flg = false; for (int j = i+1; j < holiday.Length; j++) { string tmp = holiday.Substring(j, 1); if (temp == "o" && tmp == "o" && flg == false) { cnt+=2; flg = true; } else if(temp == "o" && tmp == "o" && flg == true) { cnt++; } else { flg = false; break; } } if (total < cnt) { total = cnt; } } Console.WriteLine(total); } } }