#include <bits/stdc++.h>
using namespace std;
constexpr int MAX_N = 2e5;
int N;
string S;
vector<string> parts;
int ans;
void dfs(int n) {
  if (n == N) {
    int num = parts.size();
    if (ans < num) ans = num;
    return;
  }
  for (int i{1}; n + i <= N; ++i) {
    string sub = S.substr(n, i);
    if (parts.size() && parts.back() == sub) continue;
    parts.push_back(sub);
    dfs(n + i);
    parts.pop_back();
  }
}
int main() {
  cin >> S;
  N = S.length();
  dfs(0);
  cout << ans << endl;
  return 0;
}
