#include <bits/stdc++.h>
using namespace std;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
string S, now, pre = "";
int cnt;
int main() {
  cin >> S;
  for (int i = 0; i < (int)(S.length()); i++) {
    now += S[i];
    if (now == pre) {
      i++;
      now += S[i];
    }
    pre = now;
    cnt++;
  }
  cout << cnt << endl;
}
