#include #include #include #include using namespace std; int d, ans; void solve(int cnt, vector tf) { cnt++; int cnt2=0; for (int j = 0; j < 14; j++) { if (!tf[j]) { //cout << cnt << endl; //cout << j << endl; vectortf2; tf2 = tf; tf2[j] = true; if (cnt == d) { for (int k = 0; k < 14; k++) { if (tf2[k]) cnt2++; else { //cout << cnt2 << endl; ans = max(cnt2, ans); cnt2 = 0; } } ans = max(cnt2, ans); //cout << ans << endl; cnt2 = 0; } else { solve(cnt, tf2); } } } } int main() { int cnt = 0; vector tf; tf.resize(14); cin >> d; for (int i = 0; i < 14; i++) { char c; cin >> c; if (c == 'o') tf[i] = true; else tf[i] = false; } solve(0, tf); cout << ans << endl; return 0; }