#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int i, j, l, k, cnt = 0;
  char ch;
  cin >> s;
  l = s.length();
  for (i = 0; i < l; i++) {
    j = i;
    ch = s[i];
    while (s[j] == ch && j < l) {
      j++;
    }
    k = j;
    j -= i;
    if ((j & 1) == 0) cnt++;
    i = k - 1;
  }
  cout << cnt << endl;
}
