#include <bits/stdc++.h>
using namespace std;
int n;
string s;
bool sovle() {
  for (int i = 25; i >= 0; i--) {
    char w = char(i + 'a');
    for (int j = 0; j < s.length(); j++) {
      if (s[j] != w) continue;
      if (j != 0 && s[j - 1] == w - 1) {
        s.erase(j, 1);
        return true;
      }
      if (j != s.length() - 1 && s[j + 1] == w - 1) {
        s.erase(j, 1);
        return true;
      }
    }
  }
  return false;
}
int main() {
  int ans = 0;
  cin >> n >> s;
  while (sovle() == true) ans++;
  cout << ans;
}
