#include <bits/stdc++.h>
using namespace std;
const int N = 200100;
char a[N];
int book[N], ans, n;
int main() {
  cin.getline(a, N);
  n = ans = strlen(a);
  for (int i = 0; i < n; i++)
    if (!book[a[i] - 'a']) book[a[i] - 'a'] = 1, --ans;
  printf("%d\n", ans);
  return 0;
}
