#include <bits/stdc++.h>
using namespace std;
void func(void) {
  freopen("input.c", "r", stdin);
  freopen("output.c", "w", stdout);
}
void print(vector<long long> &v) {
  cout << v.size() << endl;
  for (int i = 0; i < v.size(); i++) {
    printf("%lld ", v[i]);
  }
  printf("\n");
}
void print(vector<pair<long long, long long> > &v) {
  cout << v.size() << endl;
  for (int i = 0; i < v.size(); i++) {
    printf("%lld %lld\n", v[i].first, v[i].second);
  }
}
void print(double d) { cout << fixed << setprecision(10) << d << endl; }
void print(string s, double d) {
  cout << s << " ";
  cout << fixed << setprecision(10) << d << endl;
}
int main() {
  long long n, q, i, j = 0, temp, t, k, ans = 0, sum = 0, x, y, z, cnt = 0, m,
                     fg = 0, mx = 0, mx1 = 0, mn = 8000000000000000000,
                     mn1 = 8000000000000000000;
  cin >> n;
  string s;
  cin >> s;
  char ch = 'z';
  while (s.size()) {
    int fg = 0;
    for (int i = 0; i < s.size(); i++) {
      if (s[i] == ch) {
        if (i - 1 >= 0 and s[i - 1] + 1 == ch) {
          s.erase(s.begin() + i);
          fg = 1;
          break;
        }
        if (i + 1 < s.size() and s[i + 1] + 1 == ch) {
          fg = 1;
          s.erase(s.begin() + i);
          break;
        }
      }
    }
    if (fg) ans++;
    if (fg)
      ch = 'z';
    else
      ch--;
    if (ch == 'a') break;
  }
  cout << ans << endl;
}
