#include <iostream>
#include <string>
#include <stack>
using namespace std;
string division(string x,int k){
int res=0;
string y;
y=x;
for(int i=0;i<x.length();i++){
int curt=res*10+x[i]-'0';
char d=curt/k+'0';
y[i]=d;
res=curt%k;
}
int i=0;
while(y[i]=='0') i++;
if(y=="0") return y;
else return y.substr(i);
}
stack<int> s;
int main(){
string x;
while(cin>>x){
if(x=="0") {
cout<<0<<endl;
continue;
}
while(x!="0"){
int c=x[x.length()-1]-'0';
s.push(c%2);
x=division(x, 2);
}
while(!s.empty()){
cout<<s.top();
s.pop();
}
cout<<endl;
}
}