#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("DOINP.INP");
	long long int n;
	f1>>n;
    int i;
    long int a[10000];
    for (i=1;i<=n;i++)
	{f1>>a[i];}
    f1.close();
	int j=0;
	while (n>0)
 {  j++;
    a[j]=n%2;
    n=n/2;
    
 }
 ofstream f2("DOINP.OUT");
 for(i=j;i>0;i--)
 {f2<<a[i];}
 f2.close();
	return 0;
}
