#include <bits/stdc++.h>
const long long mod = 1e9 + 7;
const int N = 105;
long long dp[N][N][N] = {0}, f[N];
int n, x;
char s[N];
int main() {
  scanf("%d%d", &n, &x);
  scanf("%s", s + 1);
  f[1] = f[0] = 2;
  for (int i = 2; i <= x; i++) f[i] = f[i - 1] * f[i - 2] % mod;
  for (int i = 1; i <= n; i++)
    if (s[i] == '1')
      dp[1][i][i] = 1;
    else
      dp[0][i][i] = 1;
  for (int i = 2; i <= x; i++) {
    for (int l = 1; l <= n; l++)
      for (int r = l; r <= n; r++) {
        dp[i][l][r] = ((l == 1 ? f[i - 1] : 1) * dp[i - 2][l][r] % mod +
                       (r == n ? f[i - 2] : 1) * dp[i - 1][l][r] % mod) %
                      mod;
        for (int k = l; k < r; k++)
          dp[i][l][r] += dp[i - 1][l][k] * dp[i - 2][k + 1][r] % mod,
              dp[i][l][r] %= mod;
      }
  }
  printf("%lld\n", dp[x][1][n]);
  return 0;
}
