using System;
using System.IO;
using System.Linq;

namespace ABC120C
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length > 0)
            {
                Console.SetIn(new StreamReader(args[0]));
            }

            new Program().Solve();
        }

        void Solve()
        {
            var S = Console.ReadLine();
            var zero = S.ToCharArray().Where(x => x == '0').ToArray().Length;
            var one = S.ToCharArray().Where(x => x == '1').ToArray().Length;
            var diff = Math.Abs(zero - one);
            Console.WriteLine(S.ToCharArray().Length - diff);
        }
    }
}
using System;
using System.IO;
using System.Linq;

namespace ABC120C
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length > 0)
            {
                Console.SetIn(new StreamReader(args[0]));
            }

            new Program().Solve();
        }

        void Solve()
        {
            var S = Console.ReadLine();
            var zero = S.ToCharArray().Where(x => x == '0').ToArray().Length;
            var one = S.ToCharArray().Where(x => x == '1').ToArray().Length;
            var diff = Math.Abs(zero - one);
            Console.WriteLine(S.ToCharArray().Length - diff);
        }
    }
}
using System;
using System.IO;
using System.Linq;

namespace ABC120C
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length > 0)
            {
                Console.SetIn(new StreamReader(args[0]));
            }

            new Program().Solve();
        }

        void Solve()
        {
            var S = Console.ReadLine();
            var zero = S.ToCharArray().Where(x => x == '0').ToArray().Length;
            var one = S.ToCharArray().Where(x => x == '1').ToArray().Length;
            var diff = Math.Abs(zero - one);
            Console.WriteLine(S.ToCharArray().Length - diff);
        }
    }
}
using System;
using System.IO;
using System.Linq;

namespace ABC120C
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length > 0)
            {
                Console.SetIn(new StreamReader(args[0]));
            }

            new Program().Solve();
        }

        void Solve()
        {
            var S = Console.ReadLine();
            var zero = S.ToCharArray().Where(x => x == '0').ToArray().Length;
            var one = S.ToCharArray().Where(x => x == '1').ToArray().Length;
            var diff = Math.Abs(zero - one);
            Console.WriteLine(S.ToCharArray().Length - diff);
        }
    }
}
using System;
using System.IO;
using System.Linq;

namespace ABC120C
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length > 0)
            {
                Console.SetIn(new StreamReader(args[0]));
            }

            new Program().Solve();
        }

        void Solve()
        {
            var S = Console.ReadLine();
            var zero = S.ToCharArray().Where(x => x == '0').ToArray().Length;
            var one = S.ToCharArray().Where(x => x == '1').ToArray().Length;
            var diff = Math.Abs(zero - one);
            Console.WriteLine(S.ToCharArray().Length - diff);
        }
    }
}
using System;
using System.IO;
using System.Linq;

namespace ABC120C
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length > 0)
            {
                Console.SetIn(new StreamReader(args[0]));
            }

            new Program().Solve();
        }

        void Solve()
        {
            var S = Console.ReadLine();
            var zero = S.ToCharArray().Where(x => x == '0').ToArray().Length;
            var one = S.ToCharArray().Where(x => x == '1').ToArray().Length;
            var diff = Math.Abs(zero - one);
            Console.WriteLine(S.ToCharArray().Length - diff);
        }
    }
}
using System;
using System.IO;
using System.Linq;

namespace ABC120C
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length > 0)
            {
                Console.SetIn(new StreamReader(args[0]));
            }

            new Program().Solve();
        }

        void Solve()
        {
            var S = Console.ReadLine();
            var zero = S.ToCharArray().Where(x => x == '0').ToArray().Length;
            var one = S.ToCharArray().Where(x => x == '1').ToArray().Length;
            var diff = Math.Abs(zero - one);
            Console.WriteLine(S.ToCharArray().Length - diff);
        }
    }
}
using System;
using System.IO;
using System.Linq;

namespace ABC120C
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length > 0)
            {
                Console.SetIn(new StreamReader(args[0]));
            }

            new Program().Solve();
        }

        void Solve()
        {
            var S = Console.ReadLine();
            var zero = S.ToCharArray().Where(x => x == '0').ToArray().Length;
            var one = S.ToCharArray().Where(x => x == '1').ToArray().Length;
            var diff = Math.Abs(zero - one);
            Console.WriteLine(S.ToCharArray().Length - diff);
        }
    }
}
using System;
using System.IO;
using System.Linq;

namespace ABC120C
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length > 0)
            {
                Console.SetIn(new StreamReader(args[0]));
            }

            new Program().Solve();
        }

        void Solve()
        {
            var S = Console.ReadLine();
            var zero = S.ToCharArray().Where(x => x == '0').ToArray().Length;
            var one = S.ToCharArray().Where(x => x == '1').ToArray().Length;
            var diff = Math.Abs(zero - one);
            Console.WriteLine(S.ToCharArray().Length - diff);
        }
    }
}
using System;
using System.IO;
using System.Linq;

namespace ABC120C
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length > 0)
            {
                Console.SetIn(new StreamReader(args[0]));
            }

            new Program().Solve();
        }

        void Solve()
        {
            var S = Console.ReadLine();
            var zero = S.ToCharArray().Where(x => x == '0').ToArray().Length;
            var one = S.ToCharArray().Where(x => x == '1').ToArray().Length;
            var diff = Math.Abs(zero - one);
            Console.WriteLine(S.ToCharArray().Length - diff);
        }
    }
}
using System;
using System.IO;
using System.Linq;

namespace ABC120C
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length > 0)
            {
                Console.SetIn(new StreamReader(args[0]));
            }

            new Program().Solve();
        }

        void Solve()
        {
            var S = Console.ReadLine();
            var zero = S.ToCharArray().Where(x => x == '0').ToArray().Length;
            var one = S.ToCharArray().Where(x => x == '1').ToArray().Length;
            var diff = Math.Abs(zero - one);
            Console.WriteLine(S.ToCharArray().Length - diff);
        }
    }
}
using System;
using System.IO;
using System.Linq;

namespace ABC120C
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length > 0)
            {
                Console.SetIn(new StreamReader(args[0]));
            }

            new Program().Solve();
        }

        void Solve()
        {
            var S = Console.ReadLine();
            var zero = S.ToCharArray().Where(x => x == '0').ToArray().Length;
            var one = S.ToCharArray().Where(x => x == '1').ToArray().Length;
            var diff = Math.Abs(zero - one);
            Console.WriteLine(S.ToCharArray().Length - diff);
        }
    }
}
using System;
using System.IO;
using System.Linq;

namespace ABC120C
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length > 0)
            {
                Console.SetIn(new StreamReader(args[0]));
            }

            new Program().Solve();
        }

        void Solve()
        {
            var S = Console.ReadLine();
            var zero = S.ToCharArray().Where(x => x == '0').ToArray().Length;
            var one = S.ToCharArray().Where(x => x == '1').ToArray().Length;
            var diff = Math.Abs(zero - one);
            Console.WriteLine(S.ToCharArray().Length - diff);
        }
    }
}
using System;
using System.IO;
using System.Linq;

namespace ABC120C
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length > 0)
            {
                Console.SetIn(new StreamReader(args[0]));
            }

            new Program().Solve();
        }

        void Solve()
        {
            var S = Console.ReadLine();
            var zero = S.ToCharArray().Where(x => x == '0').ToArray().Length;
            var one = S.ToCharArray().Where(x => x == '1').ToArray().Length;
            var diff = Math.Abs(zero - one);
            Console.WriteLine(S.ToCharArray().Length - diff);
        }
    }
}
using System;
using System.IO;
using System.Linq;

namespace ABC120C
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length > 0)
            {
                Console.SetIn(new StreamReader(args[0]));
            }

            new Program().Solve();
        }

        void Solve()
        {
            var S = Console.ReadLine();
            var zero = S.ToCharArray().Where(x => x == '0').ToArray().Length;
            var one = S.ToCharArray().Where(x => x == '1').ToArray().Length;
            var diff = Math.Abs(zero - one);
            Console.WriteLine(S.ToCharArray().Length - diff);
        }
    }
}
using System;
using System.IO;
using System.Linq;

namespace ABC120C
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length > 0)
            {
                Console.SetIn(new StreamReader(args[0]));
            }

            new Program().Solve();
        }

        void Solve()
        {
            var S = Console.ReadLine();
            var zero = S.ToCharArray().Where(x => x == '0').ToArray().Length;
            var one = S.ToCharArray().Where(x => x == '1').ToArray().Length;
            var diff = Math.Abs(zero - one);
            Console.WriteLine(S.ToCharArray().Length - diff);
        }
    }
}
using System;
using System.IO;
using System.Linq;

namespace ABC120C
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length > 0)
            {
                Console.SetIn(new StreamReader(args[0]));
            }

            new Program().Solve();
        }

        void Solve()
        {
            var S = Console.ReadLine();
            var zero = S.ToCharArray().Where(x => x == '0').ToArray().Length;
            var one = S.ToCharArray().Where(x => x == '1').ToArray().Length;
            var diff = Math.Abs(zero - one);
            Console.WriteLine(S.ToCharArray().Length - diff);
        }
    }
}
using System;
using System.IO;
using System.Linq;

namespace ABC120C
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length > 0)
            {
                Console.SetIn(new StreamReader(args[0]));
            }

            new Program().Solve();
        }

        void Solve()
        {
            var S = Console.ReadLine();
            var zero = S.ToCharArray().Where(x => x == '0').ToArray().Length;
            var one = S.ToCharArray().Where(x => x == '1').ToArray().Length;
            var diff = Math.Abs(zero - one);
            Console.WriteLine(S.ToCharArray().Length - diff);
        }
    }
}
using System;
using System.IO;
using System.Linq;

namespace ABC120C
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length > 0)
            {
                Console.SetIn(new StreamReader(args[0]));
            }

            new Program().Solve();
        }

        void Solve()
        {
            var S = Console.ReadLine();
            var zero = S.ToCharArray().Where(x => x == '0').ToArray().Length;
            var one = S.ToCharArray().Where(x => x == '1').ToArray().Length;
            var diff = Math.Abs(zero - one);
            Console.WriteLine(S.ToCharArray().Length - diff);
        }
    }
}
