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