#include <bits/stdc++.h>
using namespace std;
int read() {
  register int a(0), p(1);
  register char ch = 0;
  while ((ch < '0' || ch > '9') && ch != '-') ch = getchar();
  if (ch == '-') p = -1, ch = getchar();
  while (ch >= '0' && ch <= '9') a = a * 10 + ch - 48, ch = getchar();
  return a * p;
}
const int N = 200100;
char a[N];
int book[N], ans, n;
int main() {
  gets(a);
  n = ans = strlen(a);
  for (int i = 0; i < n; i++)
    if (!book[a[i] - 'a']) book[a[i] - 'a'] = 1, --ans;
  printf("%d", ans);
  return 0;
}
