#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 5;
const long long mod = 1e9;
#pragma GCC optimize("-O2")
const long long INF = 10000000;
long long getIInput() {
  cout.flush();
  long long x;
  cin >> x;
  return x;
}
void flash() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout.setf(ios::fixed);
  cout.setf(ios::showpoint);
  cout.precision(9);
}
void solve();
int32_t main() {
  flash();
  long long t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
void solve() {
  long long n;
  string s;
  cin >> n >> s;
  bool pos = 1;
  long long cnt = 0;
  while (pos) {
    char c = 'a';
    long long id = 0;
    pos = 0;
    for (long long i = 0; i < s.length(); i++) {
      if (i >= 1) {
        if (s[i] > s[i - 1] && s[i] - s[i - 1] == 1) {
          if (c <= s[i]) {
            pos = 1;
            c = s[i];
            id = i;
          }
        }
      }
      if (i <= s.length() - 1) {
        if (s[i] > s[i + 1] && s[i] - s[i + 1] == 1) {
          if (c <= s[i]) {
            pos = 1;
            c = s[i];
            id = i;
          }
        }
      }
    }
    if (pos == 1) s.erase(s.begin() + id), cnt++;
  }
  cout << cnt << "\n";
  return;
}
