#include <iostream>
#include <fstream>
#include <cstring>

using namespace std;
int main() {

	ifstream f1("DE002.INP");
	 ofstream f2("DE002.OUT");
	long int n;
	int i;
	string s="";
	 string a[]={"0","1"};
	 while (f1>>n)
	 {while (n>0)
	 { i=n%2;
	   s=a[i]+s;
	   n=n/2;
	 }
	 
	 f2<<s<<endl;
	 if (n==-1){break;
	 }
	 s="";}
	 f1.close();
	 f2.close();


	 
	return 0;
}
