#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  string s;
  cin >> s;
  int ans = 0;
  for (char i = 'z'; i > 'a'; i--) {
    for (int j = 0; j < s.size(); j++) {
      if (s[j] == i) {
        if (j == 0 && s[j + 1] == i - 1) {
          ans++;
          s.replace(j, 1, "");
          j = -1;
        } else if (j == n - 1 && s[j - 1] == i - 1) {
          ans++;
          s.replace(j, 1, "");
          j = -1;
        } else if (s[j - 1] == i - 1 || s[j + 1] == i - 1) {
          ans++;
          s.replace(j, 1, "");
          j = -1;
        }
      }
    }
  }
  cout << ans << '\n';
}
