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