# 题面

## Sample Input

5 3
ababa


## Sample Output

45


## Hint

1 $\le10$ $\le10$
2 $\le100$ $\le100$
3 $\le100$ $\le100$
4 $\le1,000$ $\le1,000$
5 $\le1,000$ $\le1,000$
6 $\le1,000$ $\le1,000$
7 $\le1,000$ $\le1,000$
8 $\le100,000$ $=1$
9 $\le100,000$ $\le100,000$
10 $\le100,000$ $\le100,000$
11 $\le100,000$ $\le100,000$
12 $\le100,000$ $\le1,000,000,000,000$
13 $\le100,000$ $\le1,000,000,000,000$
14 $\le100,000$ $\le1,000,000,000,000$
15 $\le500,000$ $\le1,000,000,000,000$
16 $\le500,000$ $\le1,000,000,000,000$
17 $\le500,000$ $\le1,000,000,000,000$
18 $\le1,000,000$ $=1$
19 $\le1,000,000$ $\le1,000,000$
20 $\le1,000,000$ $\le1,000,000,000,000$

# 代码

#include<iostream>
#include<cstring>
#include<cstdio>
using namespace std;
typedef long long ll;
const ll mod=19930726;
ll lenx[1000001],tas;
class PAM{
private:
int nxt[1000001][26],fail[1000001],len[1000001],s[1000001],lst,tot,n;
ll cnt[1000001];
int newn(int lg){
len[tot]=lg;
}
int getf(int u){
while(s[n-len[u]-1]!=s[n])u=fail[u];
return u;
}
public:
void init(){
memset(nxt,0,sizeof(nxt));
lst=tot=n=0;
newn(0);
newn(-1);
s[0]=-1;
fail[0]=1;
}
s[++n]=c-'a';
int cur=getf(lst);
if(!nxt[cur][c-'a']){
int u=newn(len[cur]+2);
fail[u]=nxt[getf(fail[cur])][c-'a'];
nxt[cur][c-'a']=u;
}
lst=nxt[cur][c-'a'];
cnt[lst]++;
}
void cont(){
for(int i=tot-1;i>=0;i--)cnt[fail[i]]+=cnt[i];
for(int i=2;i<tot;i++){
if(len[i]&1){
lenx[len[i]]+=cnt[i];
tas+=cnt[i];
}
}
}
}pam;
ll fastpow(ll x,ll p){
ll ans=1;
while(p){
if(p&1)ans=ans*x%mod;
x=x*x%mod;
p>>=1;
}
return ans;
}
char str[1000001];
int main(){
ll n,k,ans=1;
scanf("%lld%lld",&n,&k);
scanf("%s",str);
pam.init();