#include <bits/stdc++.h>
using namespace std;
char s[106];
set<int> st;
int main() {
  int n;
  scanf("%d", &n);
  scanf("%s", s + 1);
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    st.insert(i);
  }
  for (char a = 'z'; a >= 'a'; a--) {
    for (int t = 1; t <= 100; t++) {
      for (auto it = st.begin(); it != st.end(); it++) {
        auto id = it, is = it;
        id++;
        if ((id != st.end() && s[*it] - 1 == s[*id]) ||
            (it != st.begin() && s[*it] - 1 == s[*(--is)])) {
          if (s[*it] != a) continue;
          ans++;
          st.erase(*it);
          break;
        }
      }
    }
  }
  cout << ans << endl;
}
