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