#include <bits/stdc++.h>
using namespace std;
int main() {
  set<char> s;
  char p;
  char b = {'}'};
  while (1) {
    cin >> p;
    if (p == '{') continue;
    if (p == '}') break;
    s.insert(p);
  }
  int x = s.size();
  if (x == 0 || x == 1)
    cout << x;
  else
    cout << x - 1;
}
