#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, i, j;
  cin >> n;
  string st;
  cin >> st;
  char ch;
  long long int ans = 0;
  int cnt;
  for (ch = 'z'; ch > 'a'; ch--) {
    cnt = 1;
    while (cnt != 0) {
      cnt = 0;
      for (i = 0; i < st.length(); i++) {
        if (st[i] == ch) {
          if (i == 0) {
            if (st[i + 1] == char(ch - 1)) st.erase(i, 1), ans++, cnt++;
          } else if (i == (st.length() - 1)) {
            if (st[i - 1] == char(ch - 1)) st.erase(i, 1), ans++, cnt++;
          } else {
            if (st[i - 1] == char(ch - 1) || st[i + 1] == char(ch - 1))
              st.erase(i, 1), ans++, cnt++;
          }
        }
      }
    }
  }
  cout << ans << endl;
}
int main() {
  int t = 1;
  while (t--) solve();
}
