#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  string s;
  cin >> n >> s;
  for (int j = 122; j >= 97; j--) {
    for (int i = 0; i < n; i++) {
      for (int k = 0; k < s.size(); k++) {
        if (s[k] == (char)j &&
            ((s[k - 1] == (char)(j - 1) && k != 0) ||
             ((s[k + 1] == (char)(j - 1) && k != s.size() - 1)))) {
          s.erase(k, 1);
          k--;
        }
      }
    }
  }
  cout << n - s.size() << endl;
  return 0;
}
