#include <bits/stdc++.h>
using namespace std;
int a[26];
int main() {
  char s;
  cin >> s;
  int ans = 0;
  while (s != '}') {
    cin >> s;
    if (s != ' ' && s != ',' && s != '{') {
      a[tolower(s) - 97]++;
    }
  }
  for (int i = 0; i < 26; i++) {
    if (a[i] >= 1) ans++;
  }
  cout << ans;
  return 0;
}
