#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  cin >> S;
  int res = 0;
  char pre;
  for (int i = 0; i < (int)S.size(); i++) {
    if (S[i] == pre) {
      i++;
      res++;
    } else {
      res++;
    }
    pre = S[i];
  }
  cout << res << endl;
  return 0;
}
