#include <bits/stdc++.h>
int main(void) {
  char s[1 << 14];
  scanf("%s", s);
  int i, len = strlen(s), r = 0, b = 0;
  for (i = 0; i < len; i++) (s[i] - '1') ? b++ : r++;
  printf("%d", 2 * (r < b ? r : b));
  return 0;
}
