#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  cin >> S;
  int one = 0, zero = 0;
  for (int i = 0; i < S.size(); i++) {
    if (S.at(i) == '0') {
      zero++;
    } else if (S.at(i) == '1') {
      one++;
    }
  }
  int ans = 0;
  for (int i = 0; i < 10000; i++) {
    if (one > 0 && zero > 0) {
      zero--;
      one--;
      ans += 2;
    } else {
      cout << ans << endl;
      return 0;
    }
  }
  cout << ans << endl;
}
