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