#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  string s, t;
  int n, m;
  cin >> n;
  cin >> s;
  m = n;
  int q = 2;
  while (q--)
    for (int sk = 'z'; sk >= 'a'; --sk)
      for (int c = 'z'; c >= sk; --c)
        for (int i = 0; i < 2 * m; ++i) {
          t = "";
          bool f;
          for (int i = 0; i < n; ++i) {
            f = false;
            if (i > 0 && s[i] == c && s[i - 1] == c - 1) f = true;
            if (i < n - 1 && s[i] == c && s[i + 1] == c - 1) f = true;
            if (!f) t += s[i];
          }
          s = t;
          n = s.length();
        }
  cout << m - n;
  return 0;
}
