#include <bits/stdc++.h>
using namespace std;
string s = "";
string res = "";
int prv[300000];
int nxt[300000];
queue<int> q;
bool check(int i) {
  return (i >= 0 && i < s.size() && nxt[i] >= 0 && nxt[i] < s.size() &&
          s[i] == '1' && s[nxt[i]] == '0');
}
bool cant_change[300000];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> s;
  for (int i = 0; i < s.size(); i++) res += '#';
  for (int i = 0; i < s.size(); i++) {
    nxt[i] = i + 1;
    prv[i] = i - 1;
    cant_change[i] = false;
  }
  for (int i = 0; i < s.size(); i++) {
    if (check(i)) {
      q.push(i);
    }
  }
  while (!q.empty()) {
    int b = q.front();
    q.pop();
    int a = prv[b];
    int c = nxt[b];
    int d = nxt[c];
    nxt[b] = prv[b] = -1;
    nxt[c] = prv[c] = -1;
    nxt[a] = d;
    prv[d] = a;
    res[b] = '1';
    res[c] = '0';
    if (check(a)) q.push(a);
  }
  for (int i = 0; i < s.size(); i++)
    if (res[i] == '#')
      cout << '0';
    else
      cout << res[i];
  return 0;
}
