#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  cin >> S;
  list<int> Slist;
  for (int i = 0; i < S.size(); ++i) {
    Slist.push_back(S[i] - '0');
  }
  int ans = 0;
  while (true) {
    bool isdelete = false;
    auto prev_itr = Slist.begin();
    auto itr = ++Slist.begin();
    for (; itr != Slist.end();) {
      if ((*itr == 1 && *prev_itr == 0) || (*itr == 0 && *prev_itr == 1)) {
        Slist.erase(itr);
        Slist.erase(prev_itr);
        ans += 2;
        isdelete = true;
      }
      ++itr;
      ++prev_itr;
    }
    if (isdelete == false) break;
  }
  cout << ans << endl;
  return 0;
}
