#include using namespace std; using ll = long long; #define rep(i,m,n) for(int i=m; i> S; if(S[0] != 'x'){ cout << S << endl; }else{ int n = S.size(); ll T = stoll(S.substr(1,n-1)); cout << ll(1LL << 32) - T << endl; } return 0; }