#include #include #include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); string s; cin >> s; if (s[0] == 'x') { reverse(s.begin(), s.end()); s.pop_back(); reverse(s.begin(), s.end()); long long ss = stoll(s); cout << (1LL << 32) - ss << endl; } else { cout << s << endl; } return 0; }