#include <bits/stdc++.h>
using namespace std;
char arr[1000];
int n;
int cntr;
char a;
int main(int argc, char** argv) {
  char c;
  while (cin >> c) {
    if (c == '}') {
      break;
    }
    if (c != ',' && c != ' ' && c != '{') {
      arr[n] = c;
      n++;
    }
  }
  for (int i = 0; i < n; i++) {
    a = arr[i];
    for (int j = i + 1; j < n; j++) {
      if (arr[i] == arr[j]) {
        arr[j] = '*';
      }
    }
  }
  for (int i = 0; i < n; i++) {
    if (arr[i] != '*') {
      cntr++;
    }
  }
  cout << cntr;
  return 0;
}
