#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  vector<int> vv;
  for (int i = 0; i < s.size(); i++) {
    int kk = (int)s[i] - 97;
    vv.push_back(kk);
  }
  int count = 0;
  int pre = -1;
  int max = 25;
  int tatte = 0;
  while (max > 0) {
    int cut = 0;
    int i = 0;
    while (i < vv.size()) {
      int nova = 0;
      if (vv[i] == max) {
        if (i + 1 < vv.size()) {
          if (vv[i] - vv[i + 1] == 1) {
            vv.erase(vv.begin() + i);
            count++;
            cut = 1;
            nova = 1;
            if (i > 0) i--;
          }
        }
        if (i - 1 >= 0 && nova == 0) {
          if (vv[i] - vv[i - 1] == 1) {
            cut = 1;
            vv.erase(vv.begin() + i);
            count++;
            nova = 1;
            if (i > 0) i--;
          }
        }
        if (nova == 0) i++;
      } else
        i++;
    }
    max--;
    if (max == 1 && tatte == 0) {
      max = 25;
      tatte++;
    }
  }
  cout << count;
}
