#include #include #include const char ABC[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; const long long SIZE = (sizeof(ABC) - 1); const char *calc(const long long N, std::string &buff) { long long n = N + 1; do { n -= 1; buff += ABC[n % SIZE]; n /= SIZE; } while (n != 0); std::reverse(buff.begin(), buff.end()); return buff.c_str(); } int main() { long long N; std::string buff; std::cin >> N; std::cout << calc(N, buff) << std::endl; return 0; }