#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
template <typename T>
inline T getNum() {
  T k = 0;
  char c = getchar(), f = 1;
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = -1;
  for (; isdigit(c); c = getchar()) k = k * 10 + c - '0';
  return k * f;
}
clock_t opt, edt;
inline void init() {}
inline void tini() {}
const int maxn = 2e5 + 30;
int main() {
  init();
  int n = getNum<int>();
  string str;
  list<char> s;
  cin >> str;
  int ans = 0;
  for (int c = 'z'; c >= 'b'; c--) {
    bool fd = 1;
    while (fd) {
      fd = 0;
      for (int i = 0; i < str.size(); i++) {
        if (i != 0 and str[i] == c and str[i - 1] == str[i] - 1)
          str.erase(str.begin() + i--), ans++, fd = 1;
        else if (i + 1 != str.size() and str[i] == c and
                 str[i + 1] == str[i] - 1)
          str.erase(str.begin() + i--), ans++, fd = 1;
      }
    }
  }
  cout << ans;
  ;
  tini();
}
