#include <bits/stdc++.h>
using namespace std;
int dy[] = {1, -1, 0, 0, -1, 1, 1, -1};
int dx[] = {0, 0, 1, -1, 1, -1, 1, -1};
void file() {}
void fast() {
  std::ios_base::sync_with_stdio(0);
  cin.tie(NULL);
}
int main() {
  file();
  fast();
  int n, ans = 0;
  cin >> n;
  string str;
  cin >> str;
  for (char ch = 'z'; ch > 'a'; ch--) {
    while (true) {
      string clear = "";
      n = (int)(str.size());
      for (int i = 0; i < n; i++) {
        if (str[i] != ch) continue;
        if (i - 1 >= 0 && str[i - 1] == ch - 1)
          str[i] = '0', ans++;
        else if (i + 1 < n && str[i + 1] == ch - 1)
          str[i] = '0', ans++;
      }
      for (auto& ch : str)
        if (ch != '0') clear.push_back(ch);
      if (str == clear) break;
      str = clear;
    }
  }
  cout << ans << "\n";
  return 0;
}
