#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int num = 0;
  string s;
  cin >> s;
  for (int k = 0; k < s.size(); k++) {
    if (s[k] - '0' + s[k - 1] - '0' == 1) {
      s.erase(s.begin() + k - 1);
      s.erase(s.begin() + k - 1);
      num += 2;
      k = 0;
    }
  }
  cout << num << "\n";
  return 0;
}
