#include using namespace std; int main() { int D; vector holiday(14); cin >> D; for (int i = 0; i < 14; i++) { char c; cin >> c; if (c == 'o') holiday[i] = 1; } int ans = 0; for (int i = 0; i < 14; i++) { auto book = holiday; for (int j = i; j < min(14, i + D); j++) { if (book[j]) break; book[j] = 1; } int now = 0; for (int j = 0; j < 14; j++) { if (book[j]) now++; else now = 0; ans = max(ans, now); } } cout << ans << endl; }