#include <bits/stdc++.h>
const double pi = acos(-1.0);
const double eps = 1e-9;
const int INF = 1e9;
const int mod = 1e9 + 7;
using namespace std;
void solve() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  s = "#" + s + "#";
  int ans = 0;
  for (char c = 'z'; c > 'a'; --c) {
    bool f = 0;
    for (int i = 1; i < s.size() - 1; ++i) {
      bool f1 = (s[i] - s[i - 1] == 1);
      bool f2 = (s[i] - s[i + 1] == 1);
      bool f3 = (s[i + 1] - s[i] != 1);
      bool f4 = (s[i - 1] - s[i] != 1);
      bool f5 = (s[i] == c);
      if ((f1 || f2) && f3 && f4 && f5) {
        s.erase(i, 1);
        ans++;
        f = 1;
        break;
      }
    }
    if (f) c++;
  }
  cout << ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(6);
  solve();
}
