#include <bits/stdc++.h>
using namespace std;
int main(void) {
  string s;
  int i, k, j, n, m = 0;
  cin >> s;
  n = s.size();
  int a[26];
  for (i = 0; i < 26; i++) {
    a[i] = 0;
  }
  for (i = 0; i < n; i++) {
    a[s[i] - 'a']++;
  }
  for (i = 0; i < 26; i++) {
    if (a[i] > 0) {
      m++;
    }
  }
  if (n - m == 0) {
    cout << "1" << endl;
    return 0;
  }
  cout << n - m << endl;
}
