#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int count = 0;
  while (s.size() != 0) {
    bool find = false;
    for (int i = 0; i < s.size() - 1; i++) {
      if (s.substr(i, 2) == "10" || s.substr(i, 2) == "01") {
        s = s.substr(0, i) + (s.size() != 2 ? s.substr(i + 2) : "");
        count++;
        find = true;
        break;
      }
    }
    if (!find) break;
  }
  cout << count * 2 << endl;
}
