#include <bits/stdc++.h>
using namespace std;
int main() {
  int t = 0, j = 1;
  char s[100];
  scanf("%s", &s);
  char f = s[0];
  for (int i = 1; i < strlen(s); i++, j++) {
    if (s[i] != f) {
      t += 1 - (j % 2);
      j = 0;
      f = s[i];
    }
  }
  printf("%d", t + (1 - (j % 2)));
  return 0;
}
