#include <bits/stdc++.h>
using namespace std;
int main() {
  int count = 0, count1 = 0, count2 = 0;
  string S;
  cin >> S;
  int N = S.size();
  if (N == 0) {
    cout << 0 << endl;
  } else {
    for (int i = 0; i < N - 1; i++) {
      if (S.at(i) == '1') {
        count1++;
      } else
        count2++;
    }
    count = min(count1, count2);
    cout << count * 2 << endl;
  }
}
