#include <bits/stdc++.h>
using namespace std;
const int MAXN = 105;
const int MOD = 1000000007;
int n, x, fib[MAXN], sfib[MAXN], dp[MAXN][MAXN][MAXN][4];
char s[MAXN];
long long modpow(int a, int p) {
  if (p == 0) return 1;
  if (p % 2 == 1) return (modpow(a, p - 1) * a) % MOD;
  long long r = modpow(a, p / 2);
  return (r * r) % MOD;
}
long long solve(int L, int R, int i, int m) {
  if (i == 0) {
    if (L < R)
      return 0;
    else
      return (s[L] == '0');
  }
  if (i == 1) {
    if (L < R)
      return 0;
    else
      return (s[L] == '1');
  }
  if (dp[L][R][i][m] != -1) return dp[L][R][i][m];
  long long res = 0;
  for (int j = 0; j <= (R - L + 1); j++) {
    if (j == 0) {
      if ((m & 1) == 0)
        res = (res + solve(L, R, i - 2, m) * sfib[i - 1]) % MOD;
      else
        res = (res + solve(L, R, i - 2, m)) % MOD;
    } else if (j == (R - L + 1)) {
      if ((m & 2) == 0)
        res = (res + solve(L, R, i - 1, m) * sfib[i - 2]) % MOD;
      else
        res = (res + solve(L, R, i - 1, m)) % MOD;
    } else {
      res = (res + solve(L, L + j - 1, i - 1, m | 2) *
                       solve(L + j, R, i - 2, m | 1)) %
            MOD;
    }
  }
  return dp[L][R][i][m] = res;
}
string f[MAXN];
int main() {
  scanf("%d %d %s", &n, &x, s);
  for (int i = 0; i <= x; i++) {
    if (i <= 1)
      fib[i] = 1;
    else
      fib[i] = (fib[i - 1] + fib[i - 2]) % (MOD - 1);
    sfib[i] = modpow(2, fib[i]);
  }
  memset(dp, -1, sizeof dp);
  printf("%I64d\n", solve(0, n - 1, x, 0));
  return 0;
}
