using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Threading.Tasks;
class Program
{
	static void Main(string[] args)
	{
		string S = Console.ReadLine();
		int c0 = 0;
		int c1 = 0;
		
        for(var i = 0; i < S.Length; i++)
		{
			if (S[i] == 0) { c0++; }
			else { c1++; }
		}
		int ans = 2 * c1;
		if (c0 < c1) { ans = 2 * c0; }

		Console.WriteLine(ans);
	}
	
}