#include <bits/stdc++.h>
using namespace std;
const int N = 105;
int n, ans = 0;
char s[N];
int bj[N];
int work(int x) {
  int sum = 0;
  for (int i = 1; i <= n; i++) {
    if (bj[i]) continue;
    if (s[i] == 'a' + x) {
      for (int j = i - 1; j >= 1; j--) {
        if (!bj[j]) {
          if (s[j] == 'a' + x - 1) sum++, bj[i] = 1;
          break;
        }
      }
    }
  }
  for (int i = n; i >= 1; i--) {
    if (bj[i]) continue;
    if (s[i] == 'a' + x) {
      for (int j = i + 1; j <= n; j++) {
        if (!bj[j]) {
          if (s[j] == 'a' + x - 1) sum++, bj[i] = 1;
          break;
        }
      }
    }
  }
  return sum;
}
int main() {
  scanf("%d%s", &n, s + 1);
  for (int i = 25; i >= 1; i--) ans += work(i);
  printf("%d", ans);
  return 0;
}
