#include <iostream>
#include <vector>
using namespace std;
string divide(string origin,int x){
string ans;
int divider=0;
int n=origin.size();
for(int i=0;i<n;++i){
int current=divider*10+(origin[i]-'0');
ans.push_back(current/x+'0');
divider=current/x==0?current:current%x;
}
int i=0;
//去掉前导零
while(ans.size()!=1&&ans[i]=='0')i++;
return ans.substr(i);
}
int main(){
string str;
while(cin>>str){
vector<int> ans;
if(str.size()==1&&str[0]=='0'){
ans.push_back(0);
}
while(!(str.size()==1&&str[0]=='0')){
ans.push_back((str[str.size()-1]-'0')%2);
str=divide(str,2);
}
for(int i=ans.size()-1;i>=0;--i){
cout<<ans[i];
}
cout<<endl;
}
return 0;
}