#include <iostream>
#include <string>
using namespace std;
class Solution {
public:
string convertToTitle(int n) {
string index="ZABCDEFGHIJKLMNOPQRSTUVWXYZ";
string s;
if(n<=0)
return s;
while(n>26)
{
int i=n%26;
s=index[i]+s;
if(i==0)//特别把这种情况拿出来
{
n=(n-26)/26;
}
else
n=(n-i)/26;
}
s=index[n%26]+s;
return s;
}
};
int main()
{
int n;
cin>>n;
Solution S;
cout<<S.convertToTitle(n);
return 0;
}