#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  map<char, int> cnt;
  int ans = 0;
  while (1) {
    char a;
    cin >> a;
    if (a == '}') break;
    if (a != '{' && a != ',' && a != '}') {
      cnt[a]++;
      if (cnt[a] == 1) ans++;
    }
  }
  cout << ans << "\n";
  return 0;
}
