#include <bits/stdc++.h>
using namespace std;
string s;
int l;
void func(int i);
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> l;
  cin >> s;
  for (int i = 122; i >= 97; i--) {
    func(i);
  }
  cout << l - s.length();
}
void func(int act) {
  int le = s.length();
  for (int i = 0; i < le; i++) {
    if (int(s[i]) == act) {
      int j = i - 1;
      while (j >= 0 && int(s[j]) == act + 1) {
        s[j] = '?';
        j--;
      }
      j = i + 1;
      while (j < l && int(s[j]) == act + 1) {
        s[j] = '?';
        j++;
      }
    }
  }
  string temp = "";
  for (int i = 0; i < le; i++) {
    if (s[i] != '?') temp += s[i];
  }
  s = temp;
}
