#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int n, nr = 0;
  cin >> s;
  map<string, int> m;
  string x = "";
  for (int i = 0; i <= s.size() - 1; i++) {
    x = x + s[i];
    if (m[x] != 1) {
      nr++;
      m[x] = 1;
      x = "";
    }
  }
  cout << nr;
  return 0;
}
