#include <bits/stdc++.h>
using namespace std;
using INT = long long;
using pii = pair<int, int>;
int power(int a, int b, int c, int ans = 1) {
  for (; b; b >>= 1, a = (INT)a * a % c)
    if (b & 1) ans = (INT)ans * a % c;
  return ans;
}
int main() {
  ios::sync_with_stdio(0);
  string s;
  cin >> s;
  for (int i = s.size(), sz = 0; i--;) {
    if (s[i] == '0')
      sz++;
    else if (sz)
      sz--;
    else
      s[i] = '0';
  }
  cout << s << endl;
  return 0;
}
