#include <bits/stdc++.h>
using namespace std;
bool a[107];
int main() {
  string s;
  while (cin >> s) {
    if (s.size() > 2)
      a[s[1] - 'a'] = 1;
    else if (s != "{}")
      a[s[0] - 'a'] = 1;
  }
  int res = 0;
  for (int i = 0; i < 100; i++) res += a[i];
  cout << res;
  return 0;
}
