#include <bits/stdc++.h>
using namespace std;
const long long N = 100 + 10;
string ss;
bool visit[N];
long long n;
void solve() {
  long long ans = 0;
  for (long long i = 25; i >= 1;) {
    char c = 'a' + i;
    memset(visit, 0, sizeof(visit));
    string x = ss;
    long long len = x.size();
    for (long long j = 0; j < len; ++j) {
      if (c == x[j]) {
        if (j - 1 >= 0 && x[j - 1] == x[j] - 1) {
          ++ans;
          visit[j] = 1;
        } else if (j + 1 < len && x[j + 1] == x[j] - 1) {
          ++ans;
          visit[j] = 1;
        }
      }
    }
    ss = "";
    for (long long j = 0; j < len; ++j) {
      if (!visit[j]) {
        ss += x[j];
      }
    }
    if (ss.size() == x.size()) {
      --i;
    }
  }
  printf("%lld\n", ans);
}
int main() {
  while (~scanf("%lld", &n)) {
    cin >> ss;
    solve();
  }
  return 0;
}
