#include <bits/stdc++.h>
using namespace std;
unordered_map<string, long long> dp;
long long solve(string second) {
  long long ans = 0;
  for (char c = 'z'; c >= 'b'; c--) {
    for (long long i = 0; i < second.size(); i++) {
      while (second[i] == c && second[i + 1] == c - 1 &&
             i + 1 < second.size()) {
        second = (second.substr(0, i) + second.substr(i + 1));
        ans++;
        i = 0;
      }
      while (second[i] == c && second[i - 1] == c - 1 && i - 1 >= 0) {
        second = (second.substr(0, i) + second.substr(i + 1));
        ans++;
        i = 0;
      }
    }
  }
  return ans;
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n;
  string second;
  cin >> n;
  cin >> second;
  cout << solve(second) << endl;
  return 0;
}
