#include <bits/stdc++.h>
using namespace std;
int main() {
  int n = 0;
  int posa, posb;
  string S;
  cin >> S;
  while (1) {
    posa = S.find("10");
    if (posa != string::npos) {
      S.erase(posa, 2);
      n += 2;
    }
    posb = S.find("01");
    if (posb != string::npos) {
      S.erase(posb, 2);
      n += 2;
    }
    if (posa == string::npos && posb == string::npos) break;
  }
  cout << n << endl;
  return 0;
}
