using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace abc120c
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();

            List<char> cl = new List<char>();

            for(int i=0;i< s.Length; i++)
            {
                cl.Add(s[i]);
            }

            int remcont = 0;
            for(; ; )
            {
                int ii;
                bool remf = false;
                for(ii = 0; ii < cl.Count-1; ii++)
                {
                    if((cl[ii]=='0' && cl[ii+1]=='1')
                        || (cl[ii] == '1' && cl[ii + 1] == '0'))
                    {
                        cl.RemoveAt(ii);
                        cl.RemoveAt(ii);
                        remcont += 2;
                        remf = true;
                        break;
                    }

                }

                if(remf==false || cl.Count < 2)
                {
                    break;
                }
            }

            Console.WriteLine(remcont);

        }
    }
}
