#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  cin >> S;
  int a = 0, b = 0;
  for (int i = 0; i < S[i] != '\0'; ++i) {
    if (S[i] == '0') {
      a++;
    } else {
      b++;
    }
  }
  if (a > b) {
    cout << 2 * b << endl;
  } else {
    cout << 2 * a << endl;
  }
  return 0;
}
