#include <bits/stdc++.h>
using namespace std;
int n, m, C[4005], S[4005][4005], Sum[4005][4005], k, Mi;
char p;
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> p;
    C[i] = p - 'a';
  }
  S[n + 1][0] = Sum[n + 1][0] = 1;
  for (int i = n; i >= 1; i--)
    for (int j = 0; j <= m; j++) {
      S[i][j] = ((long long)C[i] * S[i + 1][j] + Sum[i + 1][j]) % 1000000007;
      Sum[i][j] = ((long long)C[i] * S[i + 1][j] + Sum[i + 1][j]) % 1000000007;
      for (k = i; k <= n; k++) {
        if (j >= (k - i + 1) * (n + 1 - k))
          S[i][j] = (S[i][j] + (long long)(25 - C[k]) *
                                   S[k + 1][j - (k - i + 1) * (n + 1 - k)] %
                                   1000000007) %
                    1000000007;
        else
          break;
      }
      Mi = k;
      for (int k = n; k >= Mi; k--) {
        if (j >= (k - i + 1) * (n + 1 - k))
          S[i][j] = (S[i][j] + (long long)(25 - C[k]) *
                                   S[k + 1][j - (k - i + 1) * (n + 1 - k)] %
                                   1000000007) %
                    1000000007;
        else
          break;
      }
    }
  cout << S[1][m];
}
