#include <iostream> #include <iomanip> using namespace std; int main() { int x; cin >>hex >> x; cout << x << endl; return 0; }