#include <bits/stdc++.h>
using namespace std;
int main() {
  int num[27] = {1, 0};
  char k;
  for (int i = 1;; i++) {
    cin >> k;
    if (k >= 'a' && k <= 'z') {
      int cnt = k - 96;
      num[cnt] = 1;
    }
    if (k == '}') break;
  }
  sort(num, num + 27);
  for (int i = 1; i <= 26; i++) {
    if (num[1] == 1) {
      cout << 26 << endl;
      break;
    }
    if (num[i] == 1 && i > 1) {
      cout << 26 - i << endl;
      break;
    }
  }
  return 0;
}
