#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  cin >> S;
  int K = 0;
  unordered_map<string, int> sstr;
  int j = 1;
  for (int i = 0; i < S.size(); i++) {
    while (sstr[S.substr(i, j)] == 1 && ((i + j - 1) < S.size())) {
      j++;
    }
    sstr[S.substr(i, j)] = 1;
    i = (i + j - 1);
    K++;
    j = 1;
  }
  cout << K << endl;
  return 0;
}
