#include <bits/stdc++.h>
using namespace std;
int main() {
  int ans = 0;
  string s;
  getline(cin, s);
  sort(s.begin(), s.end());
  for (int i = 0; i < s.length() - 1; i++) {
    if (s[i] == '{}' || s[i] == ',' || s[i] == ' ') {
      continue;
    } else {
      if (s[i] != s[i + 1]) {
        ans++;
      }
    }
  }
  cout << ans - 1 << endl;
  return 0;
}
