#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  cin >> S;
  int counter = 0;
  for (int i = 0; i < S.length(); i++) {
    if (S[i] == '1') counter++;
  }
  int s = S.length();
  cout << abs(s - counter) << endl;
  return 0;
}
