#include <bits/stdc++.h>
using namespace std;
const int N = 2005;
const long long mod = 1e9 + 7;
int n, m;
char s[N];
long long dp[N][N][2], g[N][N];
int main() {
  scanf("%d%d", &n, &m);
  scanf("%s", s + 1);
  dp[n + 1][0][0] = 1;
  g[n + 1][0] = 1;
  long long ans = 0;
  for (register int i = n, h; i >= 1; i--) {
    int v = s[i] - 'a';
    for (register int j = i + 1; j <= n; j++) {
      h = (n - j + 1) * (j - i - 1);
      for (register int k = 0; k + h <= m; k++)
        (dp[i][k + h][0] += dp[j][k][1]) %= mod;
      h += n - i + 1;
      for (register int k = 0; k + h <= m; k++)
        (dp[i][k + h][1] += dp[j][k][1]) %= mod;
    }
    for (register int j = 0; j <= m; j++) {
      (dp[i][j][0] += g[i + 1][j]) %= mod;
      (dp[i][j][0] *= v) %= mod;
      g[i][j] = (dp[i][j][0] + g[i + 1][j]) % mod;
      if (j >= n - i + 1) (dp[i][j][1] += g[i + 1][j - (n - i + 1)]) %= mod;
      (dp[i][j][1] *= 26 - v - 1) %= mod;
    }
  }
  for (int i = 1; i <= n; i++) {
    if ((n - i + 1) * (i - 1) <= m)
      (ans += dp[i][m - (n - i + 1) * (i - 1)][1]) %= mod;
    (ans += dp[i][m][0]) %= mod;
  }
  if (!m) ans++;
  printf("%lld\n", ans);
  return 0;
}
