N = int(input()) res = "" while True: res += chr((N % 26) + ord("A")) N //= 26 if N == 0: break N -= 1 print(res[::-1])