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