#include <bits/stdc++.h>
using namespace std;
long long BigMod(long long b, long long p, long long m) {
  long long ret = 1;
  while (p > 0) {
    if (p % 2 == 1) ret = (ret * b) % m;
    p = p >> 1;
    b = (b * b) % m;
  }
  return ret;
}
const int N = 105;
const long long MOD = 1e9 + 7;
int n, x;
string str;
long long dp[N][N][N];
long long sz[N], pw[N];
long long call(int s, int l, int r) {
  if (s <= 1) {
    if (l != r) return 0;
    if (s == 0 and str[l] == '0') return 1;
    if (s == 1 and str[l] == '1') return 1;
    return 0;
  }
  if (dp[s][l][r] != -1) return dp[s][l][r];
  long long ret = 0;
  long long A = call(s - 1, l, r);
  long long B = call(s - 2, l, r);
  if (l == 0) {
    B = (B * pw[s - 1]) % MOD;
  }
  if (r == n - 1) {
    A = (A * pw[s - 2]) % MOD;
  }
  ret = (A + B) % MOD;
  for (int i = l; i < r; i++) {
    ret += call(s - 1, l, i) * call(s - 2, i + 1, r);
    ret %= MOD;
  }
  return dp[s][l][r] = ret;
}
int main() {
  sz[0] = 1;
  sz[1] = 1;
  for (int i = 2; i < N; i++) {
    sz[i] = (sz[i - 1] + sz[i - 2]) % (MOD - 1);
  }
  for (int i = 0; i < N; i++) pw[i] = BigMod(2, sz[i], MOD);
  cin >> n >> x;
  cin >> str;
  memset(dp, -1, sizeof(dp));
  long long ans = call(x, 0, str.size() - 1);
  cout << ans << "\n";
}
