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