#include <bits/stdc++.h>
using namespace std;
long long ans = 0;
void solve(string s) {
  for (long long i = 25; i > 0; --i) {
    char c = 'a' + i;
    for (long long j = 0; j < s.size(); ++j) {
      if (s[j] != c) continue;
      if (j > 0 && s[j - 1] == (c - 1)) {
        ++ans;
        string t;
        for (long long k = 0; k < s.size(); ++k) {
          if (k != j) {
            t.push_back(s[k]);
          }
        }
        solve(t);
        return;
      }
      if (j + 1 < s.size() && s[j + 1] == (c - 1)) {
        ++ans;
        string t;
        for (long long k = 0; k < s.size(); ++k) {
          if (k != j) {
            t.push_back(s[k]);
          }
        }
        solve(t);
        return;
      }
    }
  }
}
signed main() {
  string s;
  long long n;
  cin >> n;
  cin >> s;
  solve(s);
  cout << ans;
}
