#include using namespace std; typedef long long ll; int main() { string s; cin >> s; if (s[0] == 'x') { ll x = 0; for (int i = 1; i < (int)s.size(); i++) { x = x * 10 + s[i] - '0'; } cout << (1ll << 32) - x << endl; } else { cout << s << endl; } }