#include <bits/stdc++.h>
using namespace std;
void solve();
const unsigned int M = 1000000007;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    solve();
    cout << "\n";
  }
  cerr << "time taken : " << (float)clock() / CLOCKS_PER_SEC << " secs"
       << "\n";
  return 0;
}
void solve() {
  set<char> st;
  char s;
  while (cin >> s) {
    if (s == '}')
      break;
    else if ((int)s >= 97 && (int)s <= 122) {
      st.insert(s);
    }
  }
  cout << st.size();
}
