N = input() ans = chr(ord('A')+N%26) i = 1 while N >= 26**i: ans += chr(ord('A')+(N/26**i-1)%26) i += 1 print ans[::-1]