#include <iostream>
#include <string>
using namespace std;
int main() {
// Initialize the string
string S = "10";
// Roy's move: choose index 2 and flip it
S[2] = (S[2] == '0') ? '1' : '0';
// Emon's move: choose index 1 and flip it
S[1] = (S[1] == '0') ? '1' : '0';
// Print the final string
cout << "Final string: " << S << endl;
// Calculate the maximum consecutive '1's
int max_count = 0;
int current_count = 0;
for (int i = 0; i < S.length(); i++) {
if (S[i] == '1') {
current_count++;
} else {
max_count = max(max_count, current_count);
current_count = 0;
}
}
max_count = max(max_count, current_count);
// Print the maximum consecutive '1's
cout << "Maximum consecutive '1's: " << max_count << endl;
return 0;
}