#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const double eps = 1e-8;
const double pi = acos(-1);
const long long inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3fLL;
const int N = 2e5 + 7;
inline int read() {
  char ch = getchar();
  int x = 0, f = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while ('0' <= ch && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
string s;
int main() {
  cin >> s;
  int f = 0;
  for (int i = s.length() - 1; i >= 0; i--)
    if (s[i] == '1' && f == 0)
      s[i] = '0';
    else if (s[i] == '0')
      f++;
    else if (s[i] == '1')
      f--;
  cout << s << endl;
}
