#include <bits/stdc++.h>
using namespace std;
int main(int argc, const char* argv[]) {
  string s;
  cin >> s;
  int zero = 0, one = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s.at(i) == '0') {
      zero++;
    } else {
      one++;
    }
    cout << 2 * min(zero, one);
  }
}
