#include <bits/stdc++.h>
using namespace std;
int a[110], n;
bool can[110];
char to[110];
int main() {
  cin >> n;
  scanf("%s", to + 1);
  for (int i = 1; i <= n; i++) {
    a[i] = to[i] - 'a' + 1;
  }
  int ans = 0;
  for (int i = 26; i >= 1; i--) {
    for (int j = 1; j <= n; j++) {
      if (a[j] != i) continue;
      bool fg = 0;
      if (j != 1 && a[j - 1] == i - 1) {
        fg = 1;
      }
      if (j != n && a[j + 1] == i - 1) {
        fg = 1;
      }
      if (fg) {
        ans++;
        for (int k = j + 1; k <= n; k++) {
          a[k - 1] = a[k];
        }
        n--;
      }
      if (fg) i++;
    }
  }
  cout << ans;
}
