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