#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  long long int n, i, j, sum = 0;
  cin >> n >> s;
  for (i = 26; i >= 1; i--) {
    if (s.length() == 1) break;
    for (j = 0; j < s.length(); j++) {
      if (s[j] - 'a' + 1 != i) continue;
      if (j == 0) {
        if (s[1] - 'a' + 1 == i - 1) {
          sum++;
          string ans = s;
          s.clear();
          for (int k = 0; k < ans.length(); k++)
            if (k != j) s += ans[k];
          j--;
        }
      } else if (j == s.length() - 1) {
        if (s[s.length() - 2] - 'a' + 1 == i - 1) {
          sum++;
          string ans = s;
          s.clear();
          for (int k = 0; k < ans.length(); k++)
            if (k != j) s += ans[k];
          j--;
        }
      } else {
        if (s[j - 1] - 'a' + 1 == i - 1 || s[j + 1] - 'a' + 1 == i - 1) {
          sum++;
          string ans = s;
          s.clear();
          for (int k = 0; k < ans.length(); k++)
            if (k != j) s += ans[k];
          j--;
        }
      }
    }
    for (j = s.length() - 1; j >= 0; j--) {
      if (s[j] - 'a' + 1 != i) continue;
      if (j == 0) {
        if (s[1] - 'a' + 1 == i - 1) {
          sum++;
          string ans = s;
          s.clear();
          for (int k = 0; k < ans.length(); k++)
            if (k != j) s += ans[k];
          j++;
        }
      } else if (j == s.length() - 1) {
        if (s[s.length() - 2] - 'a' + 1 == i - 1) {
          sum++;
          string ans = s;
          s.clear();
          for (int k = 0; k < ans.length(); k++)
            if (k != j) s += ans[k];
          j++;
        }
      } else {
        if (s[j - 1] - 'a' + 1 == i - 1 || s[j + 1] - 'a' + 1 == i - 1) {
          sum++;
          string ans = s;
          s.clear();
          for (int k = 0; k < ans.length(); k++)
            if (k != j) s += ans[k];
          j++;
        }
      }
    }
  }
  cout << sum << endl;
}
