#include <iostream> using namespace std; int main() { int a; int b[100]; char c; cin >> a; if(a<=9) cout << a; else if(a<36){ c=a+55; cout << c; } else{ int i = 0; while(a!=0){ b[i] = a%36; a /=36; i++; } for(int j = i-1;j>=0;j--){ if(b[j]<=9) cout << b[j]; else{ c = b[j]+55; cout << c; } } } }