#include <iostream>
#include <fstream>
#include <cstring>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
int main() {
	ifstream f1("DOITLP.INP");
	long int n,i;
	f1>>n;
    f1.close();
	string a[]={"0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"};
	string s;
	while (n>0)
 { i=n%16;
    s=a[i]+s;
    n=n/16;
 }
 ofstream f2("DOITLP.OUT");
 f2<<s;
 f2.close();
	return 0;
}
