#include <bits/stdc++.h>
using namespace std;
int n, k;
char s[2005];
long long dp[2005][2005], f[2005], mod = 1e9 + 7, ans;
int main() {
  scanf("%d %d", &n, &k);
  scanf("%s", s + 1);
  f[0] = dp[0][0] = 1;
  ans += dp[0][k];
  for (int i = 1; i <= n; ++i) {
    for (int j = 0; j <= k; ++j) {
      int l = i - 1;
      while (l >= 0 && j - (i - l) * (n - i + 1) >= 0) {
        dp[i][j] =
            (dp[i][j] + dp[l][j - (i - l) * (n - i + 1)] * ('z' - s[i]) % mod) %
            mod;
        l--;
      }
      dp[i][j] = (dp[i][j] + f[j] * (s[i] - 'a') % mod) % mod;
      f[j] = (f[j] + dp[i][j]) % mod;
    }
    ans = (ans + dp[i][k]) % mod;
  }
  printf("%lld", ans);
  return 0;
}
