#include <bits/stdc++.h>
using namespace std;
const int mod = (int)1e9 + 7;
char second[20000];
int dp[2010][2010], sum[2010];
int n, K;
inline void add(int &x, int y) {
  x += y;
  if (x >= mod) x -= mod;
}
int main() {
  scanf("%d%d\n %s", &n, &K, second + 1);
  dp[0][0] = 1;
  sum[0] = 1;
  for (int i = 1; i <= n; ++i) {
    for (int k = 0; k <= K; ++k) {
      add(dp[i][k], (sum[k] * 1ll * ((i == n) + second[i] - 'a')) % mod);
      for (int j = i; j >= 1; --j) {
        int gr = k - (i - j + 1) * (n - i + 1);
        if (gr < 0) break;
        add(dp[i][k],
            (dp[j - 1][gr] * 1ll * (26 - (second[i] - 'a' + 1))) % mod);
      }
      add(sum[k], dp[i][k]);
    }
  }
  cout << dp[n][K] << endl;
  return 0;
}
