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