#include <bits/stdc++.h>
using namespace std;
int main() {
  int res;
  string S;
  cin >> S;
  while (true) {
    int pos01 = S.find("01");
    int pos10 = S.find("10");
    if (S.size() == 0) {
      break;
    } else if (pos01 >= 0 && pos01 <= S.size() - 1) {
      S.erase(S.begin() + pos01);
      S.erase(S.begin() + pos01);
      res += 2;
    } else if (pos10 >= 0 && pos10 <= S.size() - 1) {
      S.erase(S.begin() + pos10);
      S.erase(S.begin() + pos10);
      res += 2;
    } else {
      break;
    }
  }
  cout << res << endl;
  return 0;
}
