#include<stdio.h>
#include<string.h>
int main()
{
void dec_hex(int a);
long long int a;
scanf("%lld", &a);
dec_hex(a);
return 0;
}
void dec_hex(int a) {
int ac;
ac= a % 16;
if (a / 16 != 0)
dec_hex(a / 16);
if (ac > 9)
printf("%c", ac - 10 + 'A');
else
printf("%d", ac);
a = a / 16;
}
#include<string.h>
int main()
{
void dec_hex(int a);
long long int a;
scanf("%lld", &a);
dec_hex(a);
return 0;
}
void dec_hex(int a) {
int ac;
ac= a % 16;
if (a / 16 != 0)
dec_hex(a / 16);
if (ac > 9)
printf("%c", ac - 10 + 'A');
else
printf("%d", ac);
a = a / 16;
}