#include <bits/stdc++.h>
using namespace std;
const int mm = 1000000007;
int i, j, k, n, m, a[2501], f[2501][2501][3], s2[2501], g[2501][2501], bk;
char w[2501];
int main() {
  scanf("%d%d", &n, &m);
  scanf("%s", w);
  for (i = 1; i <= n; i++) a[i] = w[i - 1] - 'a' + 1;
  memset(f, 0, sizeof(f));
  memset(s2, 0, sizeof(s2));
  f[n][0][0] = a[n] - 1;
  f[n][0][1] = 1;
  f[n][1][2] = 26 - a[n];
  s2[0] = f[n][0][0] + 1;
  g[n][0] = a[n];
  g[n][1] = 26 - a[n];
  for (i = n - 1; i; i--)
    for (j = 0; j <= m; j++) {
      f[i][j][0] = (long long)(a[i] - 1) * (long long)g[i + 1][j] % mm;
      for (k = 1; k * (n - i - k + 1) <= j && k <= n - i; k++)
        f[i][j][1] = (f[i][j][1] + f[i + k][j - k * (n - i - k + 1)][2]) % mm;
      bk = k - 1;
      for (k = n - i; k > bk && k * (n - i - k + 1) <= j; k--)
        f[i][j][1] = (f[i][j][1] + f[i + k][j - k * (n - i - k + 1)][2]) % mm;
      f[i][j][1] = (f[i][j][1] + s2[j]) % mm;
      if (j >= n - i + 1)
        f[i][j][2] =
            (long long)(26 - a[i]) * (long long)g[i + 1][j - (n - i + 1)] % mm;
      s2[j] = (s2[j] + f[i][j][0]) % mm;
      g[i][j] = (f[i][j][0] + f[i][j][1]) % mm + f[i][j][2];
      g[i][j] %= mm;
    }
  printf("%d\n", g[1][m]);
  return 0;
}
