#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ui = unsigned int;
const ll MOD = 1000000007;
int main() {
  static char S[10010];
  scanf("%s", S);
  ll len = strlen(S);
  ll countOne = 0;
  for (ll i = 0; i < len; i++) {
    if (S[i] == '1') {
      countOne++;
    }
  }
  printf("%lld", std::min(countOne, len - countOne) * 2);
  return 0;
}
