#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  cin >> S;
  bool cnt_flg;
  int rtn = 0;
  do {
    cnt_flg = false;
    int n = (int)S.length();
    for (int i = 0; i < n - 1; i++) {
      if ((S[i] == '0' && S[i + 1] == '1') ||
          (S[i] == '1' && S[i + 1] == '0')) {
        cnt_flg = true;
        S.erase(S.begin() + i, S.begin() + (i + 2));
        rtn += 2;
        break;
      }
    }
  } while (cnt_flg);
  cout << rtn << endl;
}
