#include <bits/stdc++.h>
using namespace std;
long double EPS = (long double)1e-11L;
const double PI = 3.141592653589793238462;
const int INF = 1e9 + 7;
const long long LINF = 1e18 + 7;
const int MOD = 1e9 + 7;
const int N = 1e2 + 7;
long long z[N][N][N];
long long f[N];
string s;
int n;
long long binPow(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = res * a % MOD;
    a = a * a % MOD;
    b >>= 1;
  }
  return res;
}
long long calcZ(int l, int r, int x) {
  if (x < 0) return 0;
  if (x == 0) return l == r && s[r] == '0';
  if (x == 1) return l == r && s[r] == '1';
  long long& t = z[l][r][x];
  if (t != -1) {
    return t;
  }
  t = 0;
  t = (t + calcZ(l, r, x - 1) * (r == n - 1 ? binPow(2, f[x - 2]) : 1) % MOD) %
      MOD;
  t = (t + calcZ(l, r, x - 2) * (l == 0 ? binPow(2, f[x - 1]) : 1) % MOD) % MOD;
  for (int q = l; q < r; q++) {
    t = (t + calcZ(l, q, x - 1) * calcZ(q + 1, r, x - 2) % MOD) % MOD;
  }
  return t;
}
int main() {
  f[0] = f[1] = 1;
  for (int i = 2; i < N; ++i) {
    f[i] = (f[i - 1] + f[i - 2]) % (MOD - 1);
  }
  int x;
  cin >> n >> x;
  cin >> s;
  memset(z, -1, sizeof(z));
  cout << calcZ(0, n - 1, x) << endl;
}
