#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int count = 0;
  for (int i = 0; i < s.size(); ++i) {
    if (s[i] == '0' && s[i + 1] == '1' || s[i] == '1' && s[i + 1] == '0') {
      s = s.substr(0, i) + s.substr(i + 2, s.size() - 2 - i);
      i = -1;
      count++;
    }
  }
  cout << count * 2 << endl;
}
