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