#include <bits/stdc++.h>
using namespace std;
int main() {
  char str[100005];
  gets(str);
  int a0 = 0, a1 = 0, len = strlen(str);
  for (int i = 0; i < len; i++) {
    if (str[i] == '0')
      a0++;
    else if (str[i] == '1')
      a1++;
  }
  int min = a0;
  if (min > a1) min = a1;
  printf("%d\n", min * 2);
  return 0;
}
