#include <bits/stdc++.h>
using namespace std;

int main() {
  string S;
  cin >> S;

  int r = 0, b = 0;
  for (char c : S) {
    if (c == '0')  r++;
    else b++;
  }

  cout << S.size() - abs(r - b) << endl;
  return 0;
}
