#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  string s, t;
  cin >> s;
  s.push_back('#');
  t.push_back('#');
  for (int i = 0; i < s.size(); i++) t.push_back(s[i]);
  s = t;
  for (int i = 'z'; i > 'a'; i--) {
    for (int j = 1; j < s.size(); j++) {
      if (s[j] == i && ((s[j + 1] == s[j] - 1) || (s[j - 1] == s[j] - 1))) {
        s.erase(s.begin() + j);
        j--;
      }
    }
    for (int j = s.size() - 2; j >= 0; j--) {
      if (s[j] == i && ((s[j + 1] == s[j] - 1) || (s[j - 1] == s[j] - 1))) {
        s.erase(s.begin() + j);
      }
    }
  }
  printf("%d\n", n - (s.size() - 2));
  return 0;
}
