#include <bits/stdc++.h>
using namespace std;
int main() {
  int cnt = 0, pos;
  bool flag = true;
  string s;
  cin >> s;
  int i = 0;
  while (i < s.size() - 1) {
    if (s[i] == '0' && s[i + 1] == '1' || s[i] == '1' && s[i + 1] == '0') {
      s.erase(s.begin() + i, s.begin() + i + 2);
      cnt += 2;
      if (i > 0) i--;
    } else {
      i++;
    }
  }
  cout << cnt << endl;
  return 0;
}
