#include <bits/stdc++.h>
using namespace std;
int n;
bool used[110];
string s;
int main() {
  cin >> n >> s;
  int res = 0;
  for (int i = 25; i >= 1; i--) {
    char x = 'a' + i, y = x - 1;
    for (int j = 0; j < n; j++) {
      if (s[j] == x) {
        int l = j - 1, r = j + 1;
        while (l >= 0 && (s[l] == '?' || s[l] == x)) l--;
        if (l >= 0 && s[l] == y) {
          res++;
          s[j] = '?';
          continue;
        }
        while (r < n && (s[r] == '?' || s[r] == x)) r++;
        if (r < n && s[r] == y) {
          res++;
          s[j] = '?';
          continue;
        }
      }
    }
  }
  cout << res << endl;
  return 0;
}
