#include <bits/stdc++.h>
#pragma GCC optimize("-Ofast")
using namespace std;
long long power(long long x, long long y) {
  long long temp;
  if (y == 0) return 1;
  temp = (power(x, y / 2)) % 1000000007;
  if (y % 2 == 0)
    return ((temp % 1000000007) * temp) % 1000000007;
  else
    return ((x * temp % 1000000007) * temp) % 1000000007;
}
long long inv(long long x) {
  return (power(x, 1000000007 - 2) + 1000000007) % 1000000007;
}
bool comp(long long a, long long b) { return a > b; }
int32_t main() {
  iostream::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, counter = 0;
  string s;
  cin >> n >> s;
  for (long long l = 26; l >= 0; l--) {
    for (long long x = 0; x < 100; x++) {
      for (long long i = 0; i < s.size(); i++) {
        if ((long long)(s[i] - 'a') == l) {
          bool check = 0;
          if (i != 0)
            if (s[i - 1] + 1 == s[i]) check = 1;
          if (i + 1 != s.size())
            if (s[i + 1] + 1 == s[i]) check = 1;
          if (check) {
            s.erase(s.begin() + i);
            counter++;
            break;
          }
        }
      }
    }
  }
  cout << counter;
  return 0;
}
