#include <iostream> #include <stack> #include <string> using namespace std; int main() { char c; stack<char> cStack; while (cin >> c) { cStack.push(c); } int index = 1; int res = 0; while (cStack.size() > 0 && c != 'x') {...