using System;

class cppboljiodcs
{
    static void Main(string[] args)
    {
        string rec = Console.ReadLine();
        int brojac = 0;
        int duzina = rec.Length;

        for (int i = 0; i < duzina; i++)
        {
            for (int j = 1; j < duzina; j++)
            {
                if (rec[i] == rec[j] && i != j && Math.Abs(i - j) % 2 == 1)
                {
                    brojac++;
                    i = j;
                }
            }
        }

        Console.WriteLine(brojac);
    }
}