#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7, N = 2e3 + 5;
int n, K, dp[N][N], f[N][N];
string s;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> K >> s;
  s = '*' + s;
  dp[0][0] = 1;
  f[0][0] = 1;
  for (int i = 1; i <= n; ++i) {
    for (int j = 0; j <= K; ++j) {
      for (int k = i; k > 0; --k) {
        if (j - (i - k + 1) * (n - i + 1) < 0) break;
        if (j - (i - k + 1) * (n - i + 1) >= 0)
          dp[i][j] = (dp[i][j] + 1LL * ('z' - s[i]) *
                                     dp[k - 1][j - (i - k + 1) * (n - i + 1)]) %
                     mod;
      }
      dp[i][j] = (dp[i][j] + 1LL * f[i - 1][j] * (s[i] - 'a')) % mod;
      f[i][j] = (dp[i][j] + f[i - 1][j]) % mod;
    }
  }
  cout << f[n][K];
  return 0;
}
