#include <bits/stdc++.h>
using namespace std;
int main() {
  int cnt = 0;
  char c;
  bool tbl[27];
  memset(tbl, true, sizeof(tbl));
  while (cin >> c) {
    if (c == '{' || c == '}' || c == ',' || c == ' ') continue;
    if (tbl[c - 'a']) {
      tbl[c - 'a'] = false;
      ++cnt;
    }
  }
  cout << cnt << endl;
  return 0;
}
