#include <bits/stdc++.h>
using namespace std;
const int N = 100 + 5;
const int mod = 1e9 + 7;
inline int add(int x, int y) { return x + y >= mod ? x + y - mod : x + y; }
inline int mul(int x, int y) { return (long long)x * y % mod; }
int n, fibx;
char s[N];
int fibMod[N], pw[N];
int dp[N][N][N];
int fe(int x, int k) {
  int res = 1;
  while (k) {
    if (k & 1) res = mul(res, x);
    x = mul(x, x);
    k >>= 1;
  }
  return res;
}
int f(int l, int r, int x) {
  if (x < 0) return 0;
  if (x == 0) return l == r and s[l] == '0';
  if (x == 1) return l == r and s[l] == '1';
  int &ret = dp[l][r][x];
  if (ret != -1) return ret;
  ret = 0;
  ret = add(ret, mul(f(l, r, x - 1), r == n ? pw[x - 2] : 1));
  ret = add(ret, mul(f(l, r, x - 2), l == 1 ? pw[x - 1] : 1));
  for (int k = l; k < r; k++) {
    ret = add(ret, mul(f(l, k, x - 1), f(k + 1, r, x - 2)));
  }
  return ret;
}
int main() {
  fibMod[0] = fibMod[1] = 1;
  for (int i = 2; i < N; i++) {
    fibMod[i] = (fibMod[i - 1] + fibMod[i - 2]) % (mod - 1);
  }
  for (int i = 0; i < N; i++) {
    pw[i] = fe(2, fibMod[i]);
  }
  scanf("%d %d", &n, &fibx);
  scanf("%s", s + 1);
  memset(dp, -1, sizeof(dp));
  printf("%d\n", f(1, n, fibx));
  return 0;
}
