#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  getline(cin, s);
  if (s.size() == 3)
    cout << "1";
  else {
    int count = 0;
    int i = 0, len, j;
    len = s.size();
    for (i = 0; i < len; i++) {
      if (s[i] == ' ') {
        for (j = i; j < len; j++) s[j] = s[j + 1];
        len--;
      }
    }
    sort(s.begin(), s.end());
    for (int i = 0; i < s.size(); i++) {
      if (s[i] != ',' && s[i] != '{' && s[i] != '}' && s[i + 1] != '{' &&
          s[i + 1] != '}') {
        if (s[i] != s[i + 1])
          count++;
        else
          continue;
      }
    }
    cout << count;
  }
  return 0;
}
