#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  bool flag = true;
  bool done = false;
  int count = 0;
  int len = s.size();
  while (flag) {
    done = false;
    for (int i = 0; i < s.size(); ++i) {
      if ((s[i] == '0' && s[i + 1] == '1') or
          (s[i] == '1' && s[i + 1] == '0')) {
        s.erase(s.begin() + i, s.begin() + i + 2);
        count += 2;
        done = true;
      }
    }
    if (!done) flag = false;
  }
  cout << count << endl;
}
