#include <array>
#include <iostream>
std::string to_hex(unsigned number)
{
static const std::array<char, 16> hexdigits =
{'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'A', 'B', 'C', 'D', 'E', 'F',};
std::string hex;
while (number != 0) {
hex.push_back(hexdigits[number % 16]);
number /= 16;
}
return {hex.rbegin(), hex.rend()};
}
int main()
{
unsigned number;
std::cin >> number;
std::cout << to_hex(number) << std::endl;
}
I2luY2x1ZGUgPGFycmF5PgojaW5jbHVkZSA8aW9zdHJlYW0+CgoKc3RkOjpzdHJpbmcgdG9faGV4KHVuc2lnbmVkIG51bWJlcikKewogICAgc3RhdGljIGNvbnN0IHN0ZDo6YXJyYXk8Y2hhciwgMTY+IGhleGRpZ2l0cyA9CiAgICAgICAgeycwJywgJzEnLCAnMicsICczJywgJzQnLCAnNScsICc2JywgJzcnLAogICAgICAgICAnOCcsICc5JywgJ0EnLCAnQicsICdDJywgJ0QnLCAnRScsICdGJyx9OwogICAgc3RkOjpzdHJpbmcgaGV4OwogICAgd2hpbGUgKG51bWJlciAhPSAwKSB7CiAgICAgICAgaGV4LnB1c2hfYmFjayhoZXhkaWdpdHNbbnVtYmVyICUgMTZdKTsKICAgICAgICBudW1iZXIgLz0gMTY7CiAgICB9CiAgICByZXR1cm4ge2hleC5yYmVnaW4oKSwgaGV4LnJlbmQoKX07Cn0KCgppbnQgbWFpbigpCnsKICAgIHVuc2lnbmVkIG51bWJlcjsKICAgIHN0ZDo6Y2luID4+IG51bWJlcjsKICAgIHN0ZDo6Y291dCA8PCB0b19oZXgobnVtYmVyKSA8PCBzdGQ6OmVuZGw7Cn0K