#include <bits/stdc++.h>
using namespace std;
const int LIMIT = 2e5 + 7;
const int INF = 2e9 + 7;
long long n, r;
string s;
int main() {
  scanf("%lld", &n);
  cin >> s;
  while (true) {
    int removeSize = -1;
    int removeIndex = -1;
    for (int i = 1; i < s.size(); i++) {
      if ((s[i] - s[i - 1]) == 1) {
        int pos = s[i] - 'a';
        if (pos > removeSize) {
          removeSize = pos;
          removeIndex = i;
        }
      } else if ((s[i - 1] - s[i]) == 1) {
        int pos = s[i - 1] - 'a';
        if (pos > removeSize) {
          removeSize = pos;
          removeIndex = i - 1;
        }
      }
    }
    if (removeSize == -1) {
      break;
    }
    s.erase(s.begin() + removeIndex, s.begin() + removeIndex + 1);
    r++;
  }
  printf("%lld", r);
  return EXIT_SUCCESS;
}
