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 int M = 100005;
int n, m;
long long dp[M][10];
int d1[4], d2[4];
char str[M];
int main() {
  scanf("%d%d", &n, &m);
  scanf("%s", str);
  for (int i = 0, i_END_ = n; i < i_END_; ++i) str[i] -= 'a';
  str[n] = -1;
  for (int i = 0, i_END_ = m; i < i_END_; ++i) {
    int now = 1;
    if (i == str[0]) now |= 2;
    if (i == str[0] || i == str[1]) now |= 4;
    dp[0][now]++;
  }
  for (int i = 1, i_END_ = n; i < i_END_; ++i) {
    for (int j = 0, j_END_ = 8; j < j_END_; ++j) {
      if (!dp[i - 1][j]) continue;
      d1[0] = i - 2 + (j & 1);
      d1[1] = i - 1 + (j >> 1 & 1);
      d1[2] = i - 1 + (j >> 2 & 1);
      d1[3] = 0;
      for (int k = 0, k_END_ = m; k < k_END_; ++k) {
        for (int l = 0, l_END_ = 4; l < l_END_; ++l) d2[l] = 0;
        for (int l = 1, l_END_ = 4; l < l_END_; ++l) {
          if (str[i - 2 + l] == k)
            d2[l] = d1[l - 1] + 1;
          else
            d2[l] = max(d2[l - 1], d1[l]);
        }
        if (d2[1] >= i - 1 && d2[2] >= i && d2[3] >= i)
          dp[i][(d2[1] - (i - 1)) | ((d2[2] - i) << 1) | ((d2[3] - i) << 2)] +=
              dp[i - 1][j];
      }
    }
  }
  printf("%I64d\n", dp[n - 1][0] + dp[n - 1][1] + dp[n - 1][4] + dp[n - 1][5]);
  return 0;
}
