#include<bits/stdc++.h>
using namespace std;
int main(){
long long int d;
int b[100];
while(cin>>d){
int i=0;
if(d!=0){
while(d!=0){
b[i]=d%2;d=d/2;i++;
}
for(i=i-1;i>=0;i--) cout<<b[i];
cout<<endl;
}
else cout<<"0\n";
}
}