#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;
}
