#include <bits/stdc++.h>
using namespace std;
const int maxn = 105;
char s[maxn];
long long dp[maxn][maxn][maxn];
long long f[maxn];
const long long mod = 1e9 + 7;
int main() {
  int n, x;
  scanf("%d %d", &n, &x);
  scanf("%s", s + 1);
  f[0] = 2;
  f[1] = 2;
  for (int i = 2; i <= x; i++) f[i] = (f[i - 1] * f[i - 2]) % mod;
  for (int i = 1; i <= n; i++) {
    dp[s[i] - '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] += dp[i - 1][l][r] * (r == n ? f[i - 2] : 1);
        dp[i][l][r] %= mod;
        dp[i][l][r] += dp[i - 2][l][r] * (l == 1 ? f[i - 1] : 1);
        dp[i][l][r] %= 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;
}
