#include <stdio.h>

int main(){
  char S;
  
  scanf("%s", &S);
  
  int n = 1;
  char cmp;
  int  count1 = 0;
  int count0 = 0;
  int i=0;
  while(S[i+1] != '\0'){
    if(S[i] == '1')
		count1++;
    else
      count0++;
  }
  int ans;
  if(count1 > = count0)
    ans = count1 - count0;
  else
    ans = count0 - count1;
  
  printf("%d",ans*2);
  
return 0;  
}

