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