#include <stdio.h>
#include <string.h>

int main()
{
	int i=0;
	int length=0;
	int count1=0;
	int count2=0;
//	char str[256];

	char *str;
	
	str = (char *)malloc(100000+1);
	
	if (str == NULL) {
		return -1;
	}
	 
	
	scanf("%s",&str);
	length=strlen(str);
	
	for(i=0;i<length-1;i++)
	{
		if(str[i]=='1')
		{
			count1++;
		}
		else
		{
			count2++;
		}
	}
	
	if(count1>count2)
	{
		printf("%d",count2*2);
	}
	else
	{
		printf("%d",count1*2);
	}
	return 0;
}