#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const double EPS = 1e-10;
const int MOD = 1000000007;
const double PI = acos(-1.0);
const int maxn = 110000;
int main() {
  set<char> st;
  char t;
  cin >> t;
  while (cin >> t) {
    if (t == '}')
      break;
    else if (t != ',')
      st.insert(t);
  }
  printf("%d\n", st.size());
  return 0;
}
