#include<iostream>
#include<vector>
using namespace std;
string divide(string str, int x){
int reminder = 0;
for(int i=0; i<str.size(); i++){
int current = reminder*10+str[i]-'0';
str[i] = current/2+'0';
reminder = current%2;
}
int pos = 0;
while(str[pos]=='0'){
pos++;
}
str = str.substr(pos);
return str;
}
int main()
{
string s;
while(cin>>s){
vector<int> binary;
while(s.size()!=0){
int last = s[s.size()-1]-'0';
binary.push_back(last%2);
s = divide(s, 2);
}
for(int i=binary.size()-1; i>=0; i--){
cout<<binary[i];
}
cout<<endl;
}
return 0;
}