#include <bits/stdc++.h>   using namespace std;   const int N = 100005;   int main() {     string s;     cin >> s;     int cnt0, cnt1, len = s.size();     string t(len,  0 );     cnt0 = cnt1 = 0;     for (int i = len - 1; i >= 0; --i) {       if (s[i] ==  0 )         ++cnt0;       else {         if (cnt0 != cnt1)           t[i] =  1 ;         else           ++cnt0;         ++cnt1;       }     }     cout << t <<   n ;     return 0;   }   