#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  long long int y = s.size();
  long long int count = 0;
  for (int i = 0; i < y; i++) {
    if ((s[i] == '1' && s[i + 1] == '0') || (s[i] == '0' && s[i + 1] == '1')) {
      s.erase(i, 2);
      count += 2;
      i = 0;
      cout << s << endl;
      y = s.size();
    } else
      continue;
  }
  cout << count;
  return 0;
}
