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