#include using namespace std; using ll = long long; const ll two32 = 4294967296; int main(){ string S; cin >> S; if(S[0] == 'x'){ ll n = stoi(S.substr(1, S.size())); cout << two32 - n << endl; } else cout << S << endl; }