#include <bits/stdc++.h>
using namespace std;
const long long mei = (long long)1e9 + 7;
int main() {
  long long a, b;
  string s, t, u;
  map<string, long long> c;
  cin >> s;
  a = 0;
  b = 0;
  t = "";
  while (a < s.size()) {
    u = s[a];
    t += u;
    if (c[t] == 0) {
      c[t] = 1;
      b++;
      t = "";
    }
    a++;
  }
  cout << b;
  cout << endl;
}
