#include <iostream>
#include <math.h>
#include <fstream>
#include <cstring>
using namespace std;
int main () 
{
	ifstream f1;f1.open("DE002_2.inp");
	ofstream f2;f2.open("DE002_2.out");
	int a,n;
	string s;
	f1 >> n;
	f1.close();
	a=n;
	while (a!=0) {
		if (a%2==0) {
			s='0'+s;
		}
		else {
			s='1'+s;
		}
		a/=2;
	}
	f2 << hex << n << " ";
	f2 << s;
	f2.close();
}
