#include <bits/stdc++.h>
using namespace std;
bool cmp(int a, int b) { return a > b; }
int fast_pow(int b, int p, int m = 1) {
  if (p == 0) return 1;
  if (p == 1) return b;
  int res = fast_pow(b, p / 2, m);
  res = (res * res) % m;
  if (p % 2 == 0)
    return res;
  else
    return (b * res) % m;
}
int mmi(int a, int m) { return fast_pow(a, m - 2, m); }
int a[200001], b[200001];
int diff(char a, char b) { return int(b) - int(a); }
int32_t main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  for (char cur = 'z'; cur >= 'a'; --cur) {
    for (int i = 0; i < (int)s.size(); ++i) {
      if (s[i] != cur) {
        continue;
      }
      bool fl = false;
      if (i != 0 && s[i - 1] == s[i] - 1) {
        fl = true;
      }
      if (i != (int)s.size() - 1 && s[i + 1] == s[i] - 1) {
        fl = true;
      }
      if (fl) {
        s.erase(s.begin() + i);
        i = -1;
      }
    }
  }
  cout << n - s.length() << "\n";
  return 0;
}
