#include <bits/stdc++.h>
using namespace std;
const int N = 2 * 1e5 + 5;
int n;
map<string, int> m;
string s, str;
int main() {
  cin >> s;
  n = s.size();
  string str = "";
  int sum = 0;
  for (int i = 0; i < n; i++) {
    str += s[i];
    if (!m.count(str)) {
      m[str] = 1;
      str = "";
      sum++;
    }
  }
  cout << sum << endl;
  return 0;
}
