#include <bits/stdc++.h>
using namespace std;
int n, m;
string p;
int cnt[20][20];
unsigned int dp[1 << 20], cost[1 << 20];
int main() {
  dp[0] = 0;
  cin >> n >> m;
  for (int i = 0; i < m; i++)
    for (int j = 0; j < m; j++) cnt[i][j] = 0;
  cin >> p;
  for (int i = 1; i < n; i++) {
    if (p[i] != p[i - 1]) {
      cnt[p[i - 1] - 'a'][p[i] - 'a']++;
      cnt[p[i] - 'a'][p[i - 1] - 'a']++;
    }
  }
  for (int j = 0; j < (1 << m); j++) {
    dp[j] = -1;
    cost[j] = 0;
    for (int i = 0; i < m; i++)
      for (int k = i + 1; k < m; k++)
        if ((((1 << i) & j) != 0) ^ (((1 << k) & j) != 0)) cost[j] += cnt[i][k];
  }
  for (int j = 0; j < (1 << m); j++) {
    unsigned int mm = -1;
    for (int i = 1; i <= j; i = i << 1)
      if (j & i) mm = min(mm, dp[j ^ i] + cost[j]);
    dp[j] = mm;
  }
  cout << dp[(1 << m) - 1] + 1;
  return 0;
}
