#include <bits/stdc++.h>
using namespace std;
int n, k = 1;
string s;
void process() {
  int vt = 1;
  string t, t1;
  t += s[0];
  while (vt < n) {
    while (vt < n && t1 + s[vt] == t) {
      t1 += s[vt];
      vt++;
    }
    k++;
    t = t1 + s[vt];
    vt++;
  }
  cout << k;
}
int main() {
  cin >> s;
  n = s.length();
  process();
  return 0;
}
