#include <bits/stdc++.h>
using namespace std;
const double PI = atan(1) * 4;
const int MOD = int(1e9) + 7;
const int MAXN = 1e5;
void solve() {
  int i, j, k;
  int n;
  cin >> n;
  string s;
  cin >> s;
  vector<int> a;
  for (i = 0; i < n; i++) a.push_back(int(s[i]) - 'a');
  for (i = 25; i > 0; i--) {
    for (j = 0; j < 100; j++) {
      vector<int> to_remove;
      for (k = 0; k < a.size(); k++) {
        if (a[k] == i) {
          if (k < a.size() - 1 && a[k + 1] == i - 1) {
            to_remove.push_back(k);
            break;
          }
          if (k > 0 && a[k - 1] == i - 1) {
            to_remove.push_back(k);
            break;
          }
        }
      }
      for (int rem : to_remove) a.erase(a.begin() + rem);
    }
  }
  cout << n - a.size();
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
}
