n = int(input()) alp = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ans = "" while n: n -= 1 ans += alp[n%26] n //= 26 ans = ''.join(reversed(ans)) print(ans)