You are given a string S of length n with each character being one of the first m lowercase English letters. 

Calculate how many different strings T of length n composed from the first m lowercase English letters exist such that the length of LCS (longest common subsequence) between S and T is n - 1.

Recall that LCS of two strings S and T is the longest string C such that C both in S and T as a subsequence.

Input

The first line contains two numbers n and m denoting the length of string S and number of first English lowercase characters forming the character set for strings (1 ≤ n ≤ 100 000, 2 ≤ m ≤ 26).

The second line contains string S.

Output

Print the only line containing the answer.

Examples

Input

3 3
aaa


Output

6


Input

3 3
aab


Output

11


Input

1 2
a


Output

1


Input

10 9
abacadefgh


Output

789

Note

For the first sample, the 6 possible strings T are: aab, aac, aba, aca, baa, caa. 

For the second sample, the 11 possible strings T are: aaa, aac, aba, abb, abc, aca, acb, baa, bab, caa, cab.

For the third sample, the only possible string T is b.
#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18;
const double pi = acos(-1.0);
const int N = 100010;
int n, m;
long long dp[N][3][3], ans[N], f1[N], f2[N];
string s;
long long Solve() {
  memset(dp, 0, sizeof(dp));
  memset(ans, 0, sizeof(ans));
  memset(f1, 0, sizeof(f1));
  memset(f2, 0, sizeof(f2));
  for (int i = n - 1; i >= 0; i--) {
    for (int k = 0; k < m; k++) {
      char c = k + 'a';
      if (i == n - 1) {
        if (c != s[i]) ans[i]++;
      } else {
        if (c == s[i])
          ans[i] += ans[i + 1];
        else {
          if (c == s[i + 1])
            ans[i] += dp[i + 1][0][2];
          else
            ans[i] += dp[i + 1][0][1];
        }
      }
      if (i != 0) {
        if (i != n - 1) {
          if (c == s[i - 1] && c == s[i + 1])
            dp[i][0][2] += dp[i + 1][0][2];
          else if (c == s[i - 1] && c != s[i + 1])
            dp[i][0][2] += dp[i + 1][0][1];
          else if (c != s[i - 1] && c == s[i + 1]) {
            if (c == s[i])
              dp[i][0][2] += dp[i + 1][1][2];
            else
              dp[i][0][2] += f2[i + 1];
          } else
            dp[i][0][2]++;
          if (c == s[i - 1] && c == s[i])
            dp[i][0][1] += dp[i + 1][0][1];
          else if (c == s[i - 1] && c != s[i])
            dp[i][0][1] += f1[i + 1];
          else if (c != s[i - 1] && c == s[i])
            dp[i][0][1]++;
          if (c == s[i] && c == s[i + 1])
            dp[i][1][2] += dp[i + 1][1][2];
          else if (c == s[i] && c != s[i + 1])
            dp[i][1][2]++;
          else if (c != s[i] && c == s[i + 1])
            dp[i][1][2] += f2[i + 1];
          else
            dp[i][1][2]++;
        } else {
          dp[i][0][2]++;
          if (c == s[i - 1] || c == s[i]) dp[i][0][1]++;
          dp[i][1][2]++;
        }
        if (i != n - 1) {
          if (c == s[i - 1])
            f1[i] += f1[i + 1];
          else if (c == s[i])
            f1[i]++;
          if (c == s[i + 1])
            f2[i] += f2[i + 1];
          else
            f2[i]++;
        } else {
          if (c == s[i - 1] || c == s[i]) f1[i]++;
          f2[i]++;
        }
      }
    }
  }
  return ans[0];
}
set<string> st;
int stupSolve() {
  for (int i = 0; i < n; i++) {
    string w = "";
    for (int j = 0; j < i; j++) w += s[j];
    for (int j = i + 1; j < n; j++) w += s[j];
    for (int j = 0; j < m; j++) {
      char c = j + 'a';
      string t = c + w;
      if (t != s) st.insert(t);
      for (int k = 0; k < w.length(); k++) {
        t = "";
        for (int ind = 0; ind <= k; ind++) t += w[ind];
        t += c;
        for (int ind = k + 1; ind < w.length(); ind++) t += w[ind];
        if (t != s) st.insert(t);
      }
    }
  }
  int res = st.size();
  return res;
}
int main() {
  scanf("%d%d", &n, &m);
  cin >> s;
  cout << Solve();
  return 0;
}
