C Unification
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
class Program
{
    static void Main(string[] args)
    {
            // 入力
            string sS = System.Console.ReadLine().Trim();
            //// 入力
            //StringBuilder stbS = new StringBuilder();
            //for (int i = 0; i < 100000 / 100000; i++)
            //{
            //    stbS.Append(new string('0', 50000));
            //    stbS.Append(new string('1', 50000));
            //}
            //string sS = stbS.ToString();

            System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
            sw.Start();

            // 解析
            int iS = sS.Length;
            List<int> lstCnt = new List<int>();
            lstCnt.Add(iS - sS.Replace("0", "").Length);
            lstCnt.Add(iS - sS.Replace("1", "").Length);
            lstCnt.Sort();

            // 出力
            System.Console.WriteLine("{0}", (lstCnt[0] * 2).ToString());

            sw.Stop();
#if DEBUG
            Console.WriteLine();
            Console.WriteLine("{0}", sw.Elapsed.ToString());
            Console.WriteLine("続行するには何かキーを押してください．．．");
            Console.ReadKey();
#endif
    }

}
