#include <bits/stdc++.h>
using namespace std;
int main() {
  char S[100000], i = 0, C0 = 0, C1 = 0, an = 0;
  scanf("%s", S);
  while (S[i] != '\0') {
    if (S[i] == '0') {
      C0++;
    } else if (S[i] == '1') {
      C1++;
    }
    i++;
  }
  if (C0 < C1) {
    an = C0 * 2;
  } else if (C0 > C1) {
    an = C1 * 2;
  } else {
    an = C0 * 2;
  }
  printf("%d", an);
  return 0;
}
