#include <iostream> #include <string.h> #include <algorithm> using namespace std; string s,ans; string convert(){ for(int i = 0 ;i < s.size();){ int k = 0; // k为余数 for(int j = i;j < s.size();j ++){ int t = (k * 10 + s[j] - '0') % 2; s[j] = (k * 10 + s[j] - '0') / 2 + '0'; k = t; } ans += (k + '0'); while(s[i] == '0')i ++; } return ans; } int main(){ while(cin >> s){ ans = ""; string answer = convert(); reverse(answer.begin(),answer.end()); cout << answer << endl; } return 0; }