- 模拟或者使用setiosflags(ios::uppercase)+hex均可
#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<int,int> P;
const int N=77;
const double PI=acos(-1);
#define line '\n'
#define gt getchar()
#define mid ((L+R)>>1)
int read(){int x=0,op=1;char c=gt;while(!isdigit(c)){if(c=='-')op=-1;c=gt;}while(isdigit(c))x=x*10+c-48,c=gt;return x*op;}
string get(int x)
{
string str="";
while(x){
int t=x%16;
if(t<=9)str=char(t+'0')+str;
else str=char(t-10+'A')+str;
x/=16;
}
if(str=="")str="0";
return str;
}
int main()
{
int n=read();
cout<<get(n)<<line;
//cout<<setiosflags(ios::uppercase)<<hex<<n<<endl;
return 0;
}