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