#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  long long ans = 1LL;
  auto tmp1 = string() + s[0];
  auto tmp2 = string() + s[1];
  bool flag = false;
  int i = 1;
  for (i; i < s.size() - 1; ++i) {
    tmp2 = string() + s[i];
    if (tmp1 == tmp2) {
      ++i;
      tmp2 += s[i];
      ans++;
      cout << "test" << i << endl;
    } else {
      ans++;
      cout << "test" << i << endl;
    }
    tmp1 = tmp2;
  }
  if (i == s.size() - 2 && tmp1 != string() + s[s.size() - 1]) {
    ans++;
  }
  if (s.size() == 1) {
    ans = 1;
  }
  cout << ans << endl;
}
