#include <bits/stdc++.h>
using namespace std;
const int MAX = 212;
int n, k;
string second;
int num[MAX];
int maior, menor;
int a[MAX];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  cin >> second;
  for (int i = 0; i < n; i++) {
    a[second[i] - 'a']++;
  }
  int cnt;
  cnt = 0;
  bool ok;
  ok = true;
  while (ok) {
    k = 0;
    ok = false;
    for (int j = 0; j < second.size(); j++) {
      if (!ok && ((j > 0 && second[j] == second[j - 1] + 1) ||
                  (j < second.size() - 1 && second[j] == second[j + 1] + 1))) {
        ok = true;
        k = j;
      }
      if (second[j] >= second[k] &&
          ((j > 0 && second[j] == second[j - 1] + 1) ||
           (j < second.size() - 1 && second[j] == second[j + 1] + 1))) {
        ok = true;
        k = j;
      }
    }
    if (!ok) break;
    cnt++;
    second.erase(second.begin() + k);
  }
  cout << cnt << endl;
}
