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