#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  cin >> S;
  int zero, one, Min;
  for (int i = 0; i < S.size(); i++) {
    if (S[i] == '0') {
      zero++;
    } else {
      one++;
    }
  }
  Min = min(zero, one);
  cout << Min * 2 << endl;
}
