#include <bits/stdc++.h>
using namespace std;
void my_trans(string& s,int m,int n)
{
    string res;
    for(int i=0;i<s.length();)
    {
        int yushu=0,t;
        for(int j=i;j<s.length();j++)
        {
            t=yushu;
            yushu=(yushu*m+s[j]-'0')%n;
            s[j]=(t*m+s[j]-'0')/n+'0';
        }
        res+=yushu+'0';
        while(s[i]=='0') i++;
    }
    reverse(res.begin(),res.end());
    s=res;
}
int main() {
    string s;
    while (cin>>s) {
        my_trans(s,10,2);
        cout<<s<<endl;
    }
}
// 64 位输出请用 printf("%lld")