#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int ans = 1;
  char tmp;
  int i = 1;
  while (i < (int)s.size()) {
    tmp = s[i - 1];
    if (tmp == s[i]) i++;
    i++;
    ans++;
  }
  cout << ans << endl;
  return 0;
}
