#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const int MAXN = 2006;
char S[MAXN + 5];
int dp[MAXN][MAXN];
int sum[MAXN];
int main() {
  int n, K;
  scanf("%d%d%s", &n, &K, S + 1);
  for (int i = n; i >= 0; --i)
    for (int k = 0; k < (K + 1); ++k) {
      long long ret = sum[k];
      int j;
      for (j = i + 1; j <= n; ++j) {
        int w = k - (j - i) * (n - j + 1);
        if (w < 0) break;
        ret += 1LL * dp[j][w] * ('z' - S[j]);
      }
      int oldj = j;
      for (j = n; j > oldj; --j) {
        int w = k - (j - i) * (n - j + 1);
        if (w < 0) break;
        ret += 1LL * dp[j][w] * ('z' - S[j]);
      }
      if (k == 0) ++ret;
      ret %= mod;
      dp[i][k] = ret;
      sum[k] = (sum[k] + ret * (S[i] - 'a')) % mod;
    }
  printf("%d\n", dp[0][K]);
  return 0;
}
