#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 7;
const int M = (1 << 30);
vector<int> q;
void Delete(int ind) {
  for (int i = ind; i < q.size() - 1; ++i) {
    swap(q[i], q[i + 1]);
  }
  q.pop_back();
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int n;
  string second;
  cin >> n >> second;
  int res = 0;
  char l = 'z';
  while (second.size() > 0 || l != 'a') {
    bool c = false;
    for (int i = 0; i < second.size(); ++i) {
      if (i != second.size() - 1 && second[i] == l &&
          second[i + 1] == char(l - 1)) {
        c = true;
        ++res;
        second.erase(i, 1);
        break;
      }
      if (i != 0 && second[i] == l && second[i - 1] == char(l - 1)) {
        c = true;
        ++res;
        second.erase(i, 1);
        break;
      }
    }
    if (!c) --l;
    if (l == 'a') break;
  }
  cout << res << '\n';
}
