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