#include <bits/stdc++.h>
using namespace std;
constexpr int kN = int(1E5 + 10);
bool b[kN];
int main() {
  int n, ans = 0;
  bool f;
  string s;
  cin >> n >> s;
  for (int i = 0; i < n; i++) b[i] = true;
  for (int i = 25; i > 0; i--) {
    int xx = 100;
    while (xx--)
      for (int j = 0; j < n; j++)
        if (s[j] == 'a' + i && b[j]) {
          f = false;
          for (int x = j - 1; x >= 0; x--)
            if (s[x] == 'a' + i - 1) {
              f = true;
              break;
            } else if (b[x])
              break;
          for (int x = j + 1; x < n; x++)
            if (s[x] == 'a' + i - 1) {
              f = true;
              break;
            } else if (b[x])
              break;
          if (f) {
            ans++;
            b[j] = false;
          }
        }
  }
  cout << ans << '\n';
}
