#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using VI = vector<int>;
int ans = 0;
vector<string> an;
void dpp(int i, string s, vector<string> k, int c) {
  string t;
  if (i == s.size() - 1) {
    ans = max(ans, c);
    an = k;
  }
  if (i != 0) i++;
  for (int right = i; right < s.size(); right++) {
    t += s[right];
    auto result = find(k.begin(), k.end(), t);
    if (result != k.end()) continue;
    k.push_back(t);
    dpp(right, s, k, c + 1);
  }
}
int main() {
  string s;
  cin >> s;
  vector<string> dp;
  dpp(0, s, dp, 0);
  cout << ans << endl;
}
