#include <bits/stdc++.h>

using namespace std;

int main()
{
    string a;
	long long n=0,i=0,j,p=0;
    cin>>a;
    while( a[i] )
    {
        n++;
        i++;
    }
    for( i=0; i<n; i++ )
    {
        for( j=i+1; j<n; j++ )
        {
            if( a[i] == a[j] )
                if( ( j - i )%2 != 0 )
                    p++;
        }
    }
    cout<<p;
return 0;
}