#include <iostream>
using namespace std;
int main(void) {
int n;
cin >> n;
cout << uppercase << hex << n << endl;
}
//https://pt.stackoverflow.com/q/318767/101
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4odm9pZCkgewogICAgaW50IG47ICAKICAgIGNpbiA+PiBuOyAKICAgIGNvdXQgPDwgdXBwZXJjYXNlIDw8IGhleCA8PCBuIDw8IGVuZGw7IAp9CgovL2h0dHBzOi8vcHQuc3RhY2tvdmVyZmxvdy5jb20vcS8zMTg3NjcvMTAx