#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int vis[N], head[N];
int dis[N], ecnt;
struct EDGE {
  int u, v, nxt, w;
} e[N];
void add_edge(int u, int v, int w) {
  e[ecnt].u = u;
  e[ecnt].v = v;
  e[ecnt].w = w;
  e[ecnt].nxt = head[u];
  head[u] = ecnt++;
}
char s[1000005];
int n, m;
int mp[105][105];
int p[1000005];
void floyd() {
  for (int k = 1; k <= n; k++) {
    for (int i = 1; i <= n; ++i) {
      for (int j = 1; j <= n; ++j) {
        mp[i][j] = min(mp[i][j], mp[i][k] + mp[k][j]);
      }
    }
  }
}
vector<int> v;
int main() {
  cin >> s;
  int len = strlen(s);
  int i;
  int cnt = 0;
  for (int i = len - 1; i >= 0; i--)
    if (s[i] == '0')
      cnt++;
    else if (cnt)
      cnt--;
    else
      s[i] = '0';
  cout << s << endl;
  return 0;
}
