using System;
using System.Collections.Generic;

namespace csharp
{
    class Program
    {
        static void Main(string[] args)
        {
            string str = Console.ReadLine();
            
            int num = 0;

            for( int i = 0; i < str.Length - 1; i+=2) 
            {
                if ( str[i] == str[i+1])
                {
                    i++;
                }
                    num+=2;
            }

            Console.WriteLine(num);

            return;

        }
    }
}
