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;
inline int Max(int x, int y, int z) { return max(max(x, y), z); }
const int N = 100005;
int n, m;
char s[N];
long long f[N][10];
int st[3], to[3];
long long ans;
inline int R(int b, int a[3]) {
  if (a[1] != b && a[1] != b - 1) return 8;
  int x = (a[1] < b ? 0 : 1);
  int y = a[1] - a[0];
  if (y != 0 && y != 1) return 8;
  int z = a[2] - a[1];
  if (z != 0 && z != 1) return 8;
  return x + (y << 1) + (z << 2);
}
inline void T(int b, int S, int a[3]) {
  int x = S & 1;
  int y = S >> 1 & 1;
  int z = S >> 2 & 1;
  a[1] = (!x ? b - 1 : b);
  a[0] = a[1] - y;
  a[2] = a[1] + z;
}
inline void G(int b, char c) {
  to[0] = max(st[1], st[0] + (c == s[b]));
  to[1] = Max(to[0], st[2], st[1] + (c == s[b + 1]));
  to[2] = max(to[1], st[2] + (c == s[b + 2]));
}
int main(void) {
  scanf("%d %d", &n, &m);
  scanf("%s", s + 1);
  if (n <= 1) return printf("%d\n", m - 1), 0;
  if (s[1] == s[2]) {
    st[0] = 0, st[1] = 0, st[2] = 0, f[1][R(1, st)] = m - 1;
    st[0] = 0, st[1] = 1, st[2] = 1, f[1][R(1, st)] = 1;
  } else {
    st[0] = 0, st[1] = 0, st[2] = 0, f[1][R(1, st)] = m - 2;
    st[0] = 0, st[1] = 1, st[2] = 1, f[1][R(1, st)] = 1;
    st[0] = 0, st[1] = 0, st[2] = 1, f[1][R(1, st)] = 1;
  }
  for (register int i = (1), _b = (n - 1); i <= _b; i++)
    for (register int S = (0), _b = (7); S <= _b; S++)
      if (f[i][S] != 0) {
        T(i, S, st);
        for (register int j = (1), _b = (m); j <= _b; j++) {
          G(i, 'a' + j - 1);
          f[i + 1][R(i + 1, to)] += f[i][S];
        }
      }
  for (register int S = (0), _b = (7); S <= _b; S++)
    if (f[n][S] != 0) {
      T(n, S, st);
      if (st[1] == n - 1) ans += f[n][S];
    }
  printf("%I64d\n", ans);
  return 0;
}
