#include <bits/stdc++.h>
const int N = 105;
const long long M = 1000000007LL;
long long f[N][N][N], A[N] = {2, 2}, L, n;
char s[N];
void dp() {
  for (int i = 1; i <= L; ++i) f[s[i] - '0'][i][i] = 1;
  for (int i = 2; i <= n; ++i) {
    A[i] = (A[i - 1] * A[i - 2]) % M;
    for (int l = 1; l <= L; ++l)
      for (int r = l; r <= L; ++r) {
        f[i][l][r] += f[i - 1][l][r] * (r == L ? A[i - 2] : 1) % M;
        f[i][l][r] += f[i - 2][l][r] * (l == 1 ? A[i - 1] : 1) % M;
        for (int m = l; m < r; ++m)
          f[i][l][r] += f[i - 1][l][m] * f[i - 2][m + 1][r] % M;
        f[i][l][r] %= M;
      }
  }
}
int main() {
  scanf("%lld%lld%s", &L, &n, s + 1);
  dp();
  return !printf("%lld\n", f[n][1][L]);
}
