#include #include #include int main() { int holiday; std::string weeks, s; std::cin >> holiday; std::cin >> s; weeks = s; std::cin >> s; weeks += s; int max = 0; for (int i = 0; i < weeks.length(); i++) { int count = 0, holi_num = 0; for (int j = i; j < weeks.length(); j++) { if (weeks[j] == 'x') { if (count == holiday) { break; } count++; } holi_num++; } holi_num += count - holiday; max = std::max(max, holi_num); } std::cout << max << std::endl; return 0; }