#include <bits/stdc++.h>
int max(int a, int b) { return a >= b ? a : b; }
int lmax(long int a, long int b) { return a >= b ? a : b; }
int min(int a, int b) { return b >= a ? a : b; }
int lmin(long int a, long int b) { return b >= a ? a : b; }
int sei(int a) { return a > 0 ? a : 0; }
long int power(int a, int b) {
  long int count = 1;
  for (int i = 0; i < b; i++) {
    count *= 2;
  }
  return count;
}
int factorial(int n) {
  if (n > 0)
    return n * factorial(n - 1);
  else
    return 1;
}
int compare_up_int(const void *a, const void *b) {
  return *(int *)a - *(int *)b;
}
int compare_down_int(const void *a, const void *b) {
  return *(int *)b - *(int *)a;
}
int euclid(int a, int b) {
  if (a < b) {
    int tmp = a;
    a = b;
    b = tmp;
  }
  int r = a % b;
  if (r < 0) r += b;
  while (r != 0) {
    a = b;
    b = r;
    r = a % b;
    if (r < 0) r += b;
  }
  return b;
}
int main() {
  char s[10001];
  int count0 = 0, count1 = 0;
  scanf("%s", s);
  for (int i = 0; i < strlen(s); i++) {
    if (s[i] == '0')
      count0++;
    else
      count1++;
  }
  if (count1 >= 1 && count0 >= 1) {
    printf("%d", 2 * min(count0, count1));
    return 0;
  } else
    printf("%d", 0);
  return 0;
}
