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