#include <bits/stdc++.h>
using namespace std;
constexpr int64_t INF = 0x3f3f3f3f;
constexpr long long LINF = 0x3f3f3f3f3f3f3f3fLL;
const long long mod = 1e9 + 7;
bool a[30];
signed main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  string s;
  cin >> s;
  int64_t cnt = 0;
  for (int64_t i = 0; i < (s.size()); i++) {
    if (a[s[i] - 'a']) {
      ++cnt;
    } else {
      a[s[i] - 'a'] = true;
    }
  }
  cout << cnt << '\n';
}
