#include <bits/stdc++.h>
using namespace std;
const long long mode = 1000000007;
const int MAXN = 101;
int F[MAXN][MAXN][MAXN];
int G[MAXN][MAXN][MAXN][2];
int H[MAXN][MAXN][MAXN];
int Power[MAXN];
void update(int &x, int y) {
  x += y;
  if (x >= mode) x -= mode;
}
int main() {
  int n, x;
  cin >> n >> x;
  string t;
  cin >> t;
  string x0{"0"}, x1{"1"};
  for (int j = 0; j < n; j++) {
    if (t[j] == '0') {
      F[0][j][j] = 1;
      G[0][j][j][0] = 1;
      G[0][j][j][1] = 1;
      H[0][j][j] = 1;
    } else {
      F[1][j][j] = 1;
      G[1][j][j][0] = 1;
      G[1][j][j][1] = 1;
      H[1][j][j] = 1;
    }
  }
  Power[0] = 2;
  Power[1] = 2;
  for (int i = 2; i <= x; i++) {
    Power[i] = 1LL * Power[i - 1] * Power[i - 2] % mode;
  }
  for (int i = 2; i <= x; i++) {
    for (int l = 0; l < n; l++)
      for (int r = l; r < n; r++) {
        update(H[i][l][r], H[i - 1][l][r] + H[i - 2][l][r]);
        update(G[i][l][r][0], 1LL * Power[i - 2] * G[i - 1][l][r][0] % mode +
                                  G[i - 2][l][r][0]);
        update(G[i][l][r][1], G[i - 1][l][r][1] + 1LL * Power[i - 1] *
                                                      G[i - 2][l][r][1] % mode);
        update(F[i][l][r], 1LL * F[i - 1][l][r] * Power[i - 2] % mode);
        update(F[i][l][r], 1LL * F[i - 2][l][r] * Power[i - 1] % mode);
        for (int k = l; k < r; k++) {
          update(H[i][l][r], 1LL * H[i - 1][l][k] * H[i - 2][k + 1][r] % mode);
          update(G[i][l][r][0],
                 1LL * H[i - 1][l][k] * G[i - 2][k + 1][r][0] % mode);
          update(G[i][l][r][1],
                 1LL * G[i - 1][l][k][1] * H[i - 2][k + 1][r] % mode);
          update(F[i][l][r],
                 1LL * G[i - 1][l][k][1] * G[i - 2][k + 1][r][0] % mode);
        }
      }
  }
  cout << F[x][0][n - 1] << endl;
  return 0;
}
