#include #include #include <stdlib.h> #include #include #include // std::reverse using namespace std;

string toHexString(int n);

int main() {

int n;
cin >> n;

string hexStr = toHexString(n);
cout << hexStr << endl;

return 0;

}

string toHexString(int n) { // write your code here......

//fun1
//string str;
//char ch[32];
//sprintf(ch,"%X",n);
//str = ch;
//return str;

//fun2
//stringstream ss;
//ss<<setiosflags(ios::uppercase)<<hex<<n;
//string str;
//ss>>str;

//fun3

string str=""; while(n!=0) { int temp = n%16; if(temp>=0 && temp<=9) { str+=temp+'0'; } else { str+=temp -10 +'A'; } n/=16; }

reverse(str.begin(),str.end()); return str;

}