#include <iostream>
#include <string>
#include <map>
#include <vector>
#include <iterator>

using namespace std;

int main()
{
    long long int n, i, br=0;
    string s;
    cin >> s;
    n = s.size();
    map<char, vector<int>> mapa;
    for(i=0;i<n;i++)
    {
        if(mapa.find(s[i])!=mapa.end())
        {
            mapa.find(s[i])->second.push_back(i);
        }
        else
        {
            mapa.insert({s[i], {i}});
        }
    }
    for(auto iter = mapa.begin();iter!=mapa.end();iter++)
    {
        for(i=0;i<iter->second.size()-1;i++)
        {
            if((iter->second[i+1]-iter->second[i]) % 2 == 1)
            {
                br++;
            }
        }
    }
    cout << br << endl;
}