#include <bits/stdc++.h>
using namespace std;
int main() {
  char arr[102];
  cin >> arr;
  int l = strlen(arr), a = 1, sum = 0;
  for (int i = 1; i < l; i++) {
    if (arr[i] == arr[i - 1]) {
      a++;
    } else if (a % 2 == 0) {
      sum++;
      a = 1;
    }
  }
  if (a % 2 == 0) sum++;
  cout << sum;
  return 0;
}
