#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
void solve() {
  string s;
  cin >> s;
  set<char> st((s).begin(), (s).end());
  cout << s.size() - st.size() << endl;
}
int main(void) {
  ios::sync_with_stdio(0);
  cin.tie(0);
  solve();
}
