#include <bits/stdc++.h>
using namespace std;
string s;
int len;
map<long long, int> mp;
int rec(int start, string before) {
  if (start >= len) {
    return 0;
  }
  int sai = 0;
  string tt;
  for (int i = 1; i <= len - start; i++) {
    string t = s.substr(start, i);
    if (t != before) {
      int ret = rec(start + i, t) + 1;
      if (sai < ret) {
        sai = ret;
      }
    }
  }
  return mp[start + (before.length() << 20)] = sai;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> s;
  len = s.length();
  cout << rec(0, "") << endl;
  return 0;
}
