#include <bits/stdc++.h>
#pragma GCC optimize(3, "Ofast", "inline")
using namespace std;
const int N = 1005;
const int M = 100005;
const long long LINF = 1e16;
const int INF = 0x3f3f3f3f;
const unsigned long long sed = 31;
const long long mod = 1e9 + 7;
const double eps = 1e-8;
const double PI = acos(-1.0);
int n;
string s;
bool judge() {
  for (int i = 25; i >= 0; i--) {
    for (int j = 0; j < n; j++) {
      if (s[j] - 'a' != i) continue;
      if (j > 0 && s[j] - s[j - 1] == 1) {
        s.erase(j, 1);
        return true;
      }
      if (j < n && s[j] - s[j + 1] == 1) {
        s.erase(j, 1);
        return true;
      }
    }
  }
  return false;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> s;
  int ans = 0;
  while (judge()) ans++;
  cout << ans << endl;
  return 0;
}
