#include <bits/stdc++.h>
using namespace std;
int ans, mn = 1e9;
string s;
map<int, int> x;
int main() {
  cin >> s;
  for (int i = 0; i < s.size(); i++) x[s[i] - 'a'] = 1;
  cout << s.size() - x.size() << endl;
  return 0;
}
