#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int red = 0, blue = 0;
  string S;
  cin >> S;
  for (int i = 0; i < S.size(); ++i) {
    if (S[i] == '0')
      red++;
    else
      blue++;
  }
  cout << S.size() - 2 * min(red, blue) << '\n';
  cout << flush;
}
