#include <bits/stdc++.h>
using namespace std;
const int N = 105;
const int mod = 1e9 + 7;
int sub[N][N][N];
int pref[N][N];
int suff[N][N];
int ans[N];
int pw[N];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, X;
  cin >> n >> X;
  string s;
  cin >> s;
  s = "&" + s;
  for (int i = 1; i <= n; i++) {
    if (s[i] == '0')
      sub[0][i][i] = 1;
    else
      sub[1][i][i] = 1;
  }
  if (s[1] == '0')
    pref[0][1] = 1;
  else
    pref[1][1] = 1;
  if (s[n] == '0')
    suff[0][n] = 1;
  else
    suff[1][n] = 1;
  pw[0] = pw[1] = 2;
  if (s == "&0") ans[0] = 1;
  if (s == "&1") ans[1] = 1;
  for (int i = 2; i <= X; i++) {
    pw[i] = 1ll * pw[i - 1] * pw[i - 2] % mod;
    for (int l = 1; l <= n; l++) {
      for (int r = l; r <= n; r++) {
        sub[i][l][r] = (sub[i - 1][l][r] + sub[i - 2][l][r]) % mod;
        for (int m = l; m < r; m++) {
          sub[i][l][r] += 1ll * sub[i - 1][l][m] * sub[i - 2][m + 1][r] % mod;
          sub[i][l][r] %= mod;
        }
      }
    }
    for (int l = 1; l <= n; l++) {
      pref[i][l] = pref[i - 1][l];
      pref[i][l] += 1ll * pref[i - 2][l] * pw[i - 1] % mod;
      pref[i][l] %= mod;
      for (int x = 1; x < l; x++) {
        pref[i][l] += 1ll * pref[i - 1][x] * sub[i - 2][x + 1][l] % mod;
        pref[i][l] %= mod;
      }
    }
    for (int r = 1; r <= n; r++) {
      suff[i][r] = suff[i - 2][r];
      suff[i][r] += 1ll * suff[i - 1][r] * pw[i - 2] % mod;
      suff[i][r] %= mod;
      for (int x = r; x < n; x++) {
        suff[i][r] += 1ll * suff[i - 2][x + 1] * sub[i - 1][r][x] % mod;
        suff[i][r] %= mod;
      }
    }
    for (int m = 1; m < n; m++) {
      ans[i] += 1ll * pref[i - 1][m] * suff[i - 2][m + 1] % mod;
      ans[i] %= mod;
    }
    ans[i] += 1ll * ans[i - 1] * pw[i - 2] % mod;
    ans[i] %= mod;
    ans[i] += 1ll * ans[i - 2] * pw[i - 1] % mod;
    ans[i] %= mod;
  }
  cout << ans[X] << endl;
  return 0;
}
