#include <bits/stdc++.h>
using namespace std;
template <typename T>
void _do(T x) {
  cerr << x << "\n";
}
template <typename T, typename... U>
void _do(T x, U... y) {
  cerr << x << ", ";
  _do(y...);
}
const int MOD1 = 1e9 + 7;
const int MOD2 = 998244353;
const long long INF = 2e18;
const long double PI = 3.14159265358979323846;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long fpow(long long a, long long b, long long m) {
  if (!b) return 1;
  long long ans = fpow(a * a % m, b / 2, m);
  return (b % 2 ? ans * a % m : ans);
}
long long inv(long long a, long long m) { return fpow(a, m - 2, m); }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  string s;
  cin >> s;
  long long n = s.size();
  string ans(n, '0');
  while (1) {
    long long id = -1;
    bool x = 0;
    for (long long i = 0; i < n; i++) {
      if (s[i] == '0' && id != -1) {
        ans[id] = '1', ans[i] = '0';
        s[id] = s[i] = 'x';
        id = -1, x = 1;
      }
      if (s[i] == '1') id = i;
    }
    if (!x) break;
  }
  cout << ans;
}
