#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  cin >> S;
  int count = 0;
  int flag = true;
  while (flag) {
    for (int i = 0; i < S.size() - 1; i++) {
      if (S.size() == 0) break;
      if (S.at(i) != S.at(i + 1)) {
        if ((S.at(i) == '0' && S.at(i + 1) == '1') ||
            (S.at(i) == '1' && S.at(i + 1) == '0')) {
          count++;
          S.at(i) = 10000;
          S.at(i + 1) = 10000;
          sort(S.begin(), S.end());
        }
      }
      if (i == S.size() - 2) {
        flag = false;
        break;
      }
    }
  }
  cout << count * 2 << endl;
  return 0;
}
