#include #include using namespace std; int main() { string S; cin >> S; if (S[0] == 'x') { cout << (1LL << 32) - stoll(S.substr(1)) << endl; } else { cout << S << endl; } }