#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int f(string s, map<string, int> mp, int cnt, bool ff) {
  if (s.size() < 1 || cnt < 0) return mp.size();
  if (ff) {
    mp[s.substr(cnt)]++;
    if (mp[s.substr(cnt)] > 1) return 0;
    s.erase(cnt);
  }
  return max(f(s, mp, cnt - 1, true), f(s, mp, cnt - 1, false));
}
int main() {
  string s;
  cin >> s;
  map<string, int> mp;
  cout << max(f(s, mp, s.size() - 1, true), f(s, mp, s.size() - 1, false))
       << endl;
}
