#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int count_subs = 0, len_subs = 0;
  int n = s.length();
  string buf("");
  for (int i = 0; i < n; i++) {
    if (buf.empty()) {
      count_subs++;
    }
    buf += s[i];
    len_subs++;
    if (buf != s.substr(i + 1, len_subs)) {
      len_subs = 0;
      buf.clear();
    }
  }
  cout << count_subs << endl;
  return 0;
}
