#include <bits/stdc++.h>
using namespace std;
constexpr int kMod = 1000000007;
int main() {
  string S;
  cin >> S;
  unordered_set<char> s;
  for (char c : S) s.insert(c);
  cout << S.size() - s.size() << endl;
}
