#include <bits/stdc++.h>
using namespace std;
const long long int N = 3 * 1e6 + 2;
long long int n, k;
string s;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  cin >> s;
  long long int res = 0;
  for (char cur = 'z'; cur >= 'a'; --cur) {
    bool can = 1;
    while (can) {
      n = s.length();
      bool f = 0;
      for (long long int i = 0; i < n; i++) {
        if (s[i] == cur) {
          char prev = '?', nex = '?';
          if (i > 0) prev = s[i - 1];
          if (i < n - 1) nex = s[i + 1];
          if (prev + 1 == cur || nex + 1 == cur) {
            s.erase(s.begin() + i);
            f = 1;
            ++res;
            break;
          }
        }
      }
      if (!f) can = 0;
    }
  }
  cout << res << '\n';
  return 0;
}
