#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int i = 1;
  int ct = 1;
  string prev = "";
  string curr = "";
  prev += s[0];
  while (i < s.length()) {
    curr += s[i];
    if (curr == prev) {
      i++;
      curr += s[i];
    }
    prev = "";
    prev += curr;
    curr = "";
    i++;
    ct++;
  }
  cout << ct << endl;
  return 0;
}
