#include <bits/stdc++.h>
using namespace std;
template <typename IntType>
void read(IntType& val) {
  val = 0;
  int c;
  bool inv = false;
  while (!isdigit(c = getchar()))
    if (c == '-') inv = true;
  do {
    val = (val << 1) + (val << 3) + c - '0';
  } while (isdigit(c = getchar()));
  if (inv) val = -val;
}
template <>
void read<string>(string& str) {
  str.clear();
  int c;
  while (iscntrl(c = getchar()) || c == ' ' || c == '\t')
    ;
  do {
    str.push_back(c);
  } while (!(iscntrl(c = getchar()) || c == ' ' || c == '\t'));
}
string s, ans;
int cnt = 0;
int main(int argc, char* argv[]) {
  read(s);
  ans = s;
  for (int i = s.size() - 1; i >= 0; i--) {
    if (s[i] == '0')
      cnt++;
    else if (cnt > 0)
      cnt--;
    else
      ans[i] = '0';
  }
  printf("%s\n", ans.c_str());
  return 0;
}
