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