#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 8, MOD = 1e9 + 7;
const long long INF = 2e16;
using vi = vector<long long>;
using vp = vector<pair<long long, long long>>;
mt19937 Flash_new_51(515151);
bool used[N];
signed main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  string s, s1;
  cin >> s;
  stack<pair<char, long long>> mem;
  for (long long i = 0; i < s.size(); i++) {
    if (!mem.empty()) {
      if (mem.top().first == '1' && s[i] == '0') {
        used[i] = used[mem.top().second] = true;
        mem.pop();
      } else
        mem.push({s[i], i});
    } else
      mem.push({s[i], i});
  }
  for (long long i = 0; i < s.size(); i++)
    if (used[i])
      s1 += s[i];
    else
      s1 += '0';
  cout << s1;
}
