#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<char> s;
  char c;
  int i, k = 0;
  for (;; i++) {
    cin >> c;
    if (c == '}') break;
    if (c >= 95 && c <= 122) s.push_back(c);
  }
  sort(s.begin(), s.end());
  for (i = 1; i <= s.size(); i++) {
    if (s[i] != s[i - 1]) k++;
  }
  cout << k << endl;
  return 0;
}
