#include <bits/stdc++.h>
int main() {
  int i, count;
  char s[200001];
  scanf("%s", s);
  i = 1;
  count = 1;
  while (s[i] != '\0') {
    if (s[i] == s[i - 1]) {
      printf("s[%d] == s[%d]\n", i, i - 1);
      i++;
      if (s[i] == '\0') break;
      i++;
      count++;
      if (s[i] == '\0') break;
      i++;
      count++;
    } else {
      printf("s[%d] != s[%d]\n", i, i - 1);
      i++;
      count++;
    }
    printf("count i=%d : %d\n", i, count);
  }
  printf("%d", count);
  return 0;
}
