#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, mx = 0, k = 0, z, m, mx1;
  string s;
  cin >> n >> s;
  for (auto c : s) {
    if (c - 'a' > mx) mx = c - 'a';
  }
  mx1 = mx;
  while (mx != 0) {
    z = 0;
    m = 0;
    for (int i = 0; i < n; i++) {
      if (mx == 0) break;
      if (s[i] - 'a' == mx1) {
        if (mx1 == mx) z = 1;
        if ((i == n - 1 && s[n - 2] == s[n - 1] - 1) ||
            (i == 0 && s[1] == s[0] - 1) ||
            (i != n - 1 && i != 0 &&
             ((s[i - 1] == s[i] - 1) || (s[i + 1] == s[i] - 1)))) {
          s.erase(i, 1);
          k++;
          m = 1;
          mx1 = mx;
        }
      }
      if (z == 0 && i == n - 1 && m == 0) mx--;
      if (m == 0 && i == n - 1) mx1--;
    }
  }
  cout << k;
  return 0;
}
