#include <bits/stdc++.h>
using namespace std;
int main () {
  string S;
  cin >> S;
  map<char,int> mp;
  int front = 0;
  for(int i = 0; i < S.size(); i++){
    if(mp.count(S.substr(front, i + 1 - front))){
      continue;
    } else{
      mp[S.substr(front, i + 1 - front)];
      front = i + 1;
    }
  }
  cout << mp.size() << endl;
  return 0;
}