#include <bits/stdc++.h>
char ch[105];
int len, ans;
int main() {
  scanf("%s", ch + 1);
  len = strlen(ch + 1);
  for (int i = 1, cnt = 1; i <= len + 1; i++) {
    if (ch[i] != ch[i - 1]) {
      if (cnt % 2 == 0) ans++;
      cnt = 0;
    }
    cnt++;
  }
  printf("%d\n", ans);
  return 0;
}
