#include <bits/stdc++.h>
using namespace std;
int can_divide(vector<string> chunks, int index, string &str) {
  if (index >= str.size()) {
    return chunks.size();
  } else {
    int flag = 0;
    for (int tt = 1; tt < str.size() - index + 1; tt++) {
      string next_s = str.substr(index, tt);
      if (chunks.size() == 0 ||
          (chunks.size() == 1 && chunks.at(0) != next_s) ||
          chunks.end() != find(chunks.begin(), chunks.end(), next_s)) {
        chunks.push_back(next_s);
        int ef = can_divide(chunks, index + tt, str);
        chunks.pop_back();
        if (ef != 0) {
          if (flag < ef) flag = ef;
        }
      } else {
      }
    }
    return flag;
  }
}
int main() {
  string ss;
  cin >> ss;
  vector<string> strs(0);
  cout << can_divide(strs, 0, ss) << endl;
}
