#include <bits/stdc++.h>

using namespace std;

string convert(string s,int m,int b){
	string ans; 
	for(int i = 0 ;i < s.size();){
		int k = 0;
		// k为余数
		for(int j = i;j < s.size();j ++){
			int t = (k * m + s[j] - '0') % b;
			s[j] = (k * m + s[j] - '0') / b + '0';
			k = t;
		} 
		ans += (k + '0');
		while(s[i] == '0')i ++;
	}
	return ans;
}

int main(){
	string s;
	
	while(cin >> s){
		string answer = convert(s,10,2);
		reverse(answer.begin(),answer.end());
		cout << answer << endl;
	}
	return 0;
}