#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
  string s;
  cin >> s;
  int ret = 0;
  int pivot = 0;
  int curr_len = 1;
  int next_len = 1;
  while (pivot < s.size()) {
    if (pivot + curr_len == s.size()) break;
    if (s.substr(pivot, curr_len) == s.substr(pivot + curr_len, next_len)) {
      ++next_len;
      if (pivot + curr_len + next_len >= s.size() - 1) {
        break;
      }
    } else {
      pivot += curr_len;
      curr_len = next_len;
      next_len = 1;
      ++ret;
    }
  }
  cout << ret + 1 << endl;
  return 0;
}
