#include using namespace std; #define INF 1234567890 #define ll long long int main() { ios::sync_with_stdio(0); cin.tie(0); cin.exceptions(ios::badbit | ios::failbit); string s; cin >> s; if (s[0] == 'x') { ll x = stoll(string(s.begin()+1, s.end())); cout << (1LL<<32) - x << "\n"; } else { ll x = stoll(s); cout << x << "\n"; } return 0; }