using System;

class Program
{ 
    static int guster(string s)
    {
        int brojac = 0;

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

                    brojac++;     
                }
            }
        }

        return brojac;
    }

    static void Main()
    {
        // ucitavamo ulazne podatke

        string s = Console.ReadLine();

        // ispis

        Console.WriteLine(guster(s));
    }
}