#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int n, m;
char s[2003];
int dp[2003][2003][2];
int main() {
  int i, j, t;
  scanf("%d%d%s", &n, &m, s + 1);
  for (i = 1; i <= n; i++) s[i] ^= 0x60;
  dp[0][0][0] = 1;
  dp[0][0][1] = 0;
  for (i = 1; i <= n; i++) {
    for (j = 0; j <= m; j++) {
      dp[i][j][1] = (dp[i - 1][j][0] + dp[i - 1][j][1]) % mod;
      dp[i][j][0] = (long long)(dp[i - 1][j][0] + dp[i - 1][j][1]) % mod *
                    (s[i] - 1) % mod;
      int r = n - i + 1;
      for (t = i - 1; j - (i - t) * r >= 0 && t >= 0; t--) {
        dp[i][j][0] += (long long)dp[t][j - (i - t) * r][0] * (26 - s[i]) % mod;
        dp[i][j][0] %= mod;
      }
    }
  }
  printf("%d\n", (dp[n][m][0] + dp[n][m][1]) % mod);
  return 0;
}
