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;
#pragma GCC optimize("O3")
#pragma GCC optimize("-Ofast")
#pragma GCC optimize("-unroll-loops")
template <class L, class R>
ostream& operator<<(ostream& os, pair<L, R> P) {
  return os << "(" << P.first << "," << P.second << ")";
}
template <class T>
ostream& operator<<(ostream& os, vector<T> V) {
  os << "[";
  for (auto x : V) os << x << ", ";
  return os << "]";
}
template <typename... Args>
void dbg(Args... args) {}
string s;
int n, m;
const int MOD = 1e9 + 7;
vector<vector<long long>> dp(100010, vector<long long>(2 * 2 * 2));
int reverse_state(int n, vector<int> st) {
  vector<int> aa = {n - 2, n - 1, n - 1};
  int mul = 1, ret = 0;
  for (int i = 0; i < (3); i++) {
    if (st[i] - aa[i] < 0 or st[i] - aa[i] > 1) return -1;
    ret += (st[i] - aa[i]) * mul;
    mul *= 2;
  }
  return ret;
}
long long solve(vector<int> va) {
  for (int i = 0; i < (m); i++) {
    vector<vector<int>> small_dp(2, vector<int>(3, 0));
    vector<int> tmp = {-1, i};
    for (int ii = 1; ii < 2; ii++) {
      for (int jj = 1; jj < 3; jj++) {
        if (tmp[ii] == va[jj])
          small_dp[ii][jj] = small_dp[ii - 1][jj - 1] + 1;
        else
          small_dp[ii][jj] = max(small_dp[ii - 1][jj], small_dp[ii][jj - 1]);
      }
    }
    int nxt = reverse_state(1, small_dp[1]);
    if (nxt != -1) dp[1][nxt]++;
  }
  dbg(dp[1]);
  for (int i = (2); i < (n + 1); i++) {
    for (int j = 0; j < (m); j++) {
      for (int k = 0; k < (8); k++) {
        int d[4] = {i - 3 + k % 2, i - 2 + (k / 2) % 2, i - 2 + (k / 4) % 2};
        int nd[4] = {0};
        nd[1] = (va[i - 1] == j) ? (d[0] + 1) : max(nd[0], d[1]);
        nd[2] = (va[i] == j) ? (d[1] + 1) : max(nd[1], d[2]);
        nd[3] = (va[i + 1] == j) ? (d[2] + 1) : max(nd[2], d[3]);
        vector<int> aa = {i - 2, i - 1, i - 1};
        int nxt = 0, mul = 1;
        for (int i = 0; i < (3); i++) {
          if (nd[i + 1] - aa[i] < 0 or nd[i + 1] - aa[i] > 1) {
            nxt = -1;
            break;
          }
          nxt += (nd[i + 1] - aa[i]) * mul;
          mul *= 2;
        }
        if (nxt != -1) dp[i][nxt] += dp[i - 1][k];
      }
    }
    dbg(dp[i]);
  }
  long long ret = 0;
  for (auto x : dp[n]) ret = ret + x;
  return ret;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m >> s;
  dbg(n);
  vector<int> va(n + 10, -1);
  for (int i = 0; i < (n); i++) va[i + 1] = s[i] - 'a';
  cout << solve(va) - 1 << "\n";
}
