#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int dp[111][111][111], n, x, len, f[111], le[111];
char str[111];
int power(int a, int n) {
  if (n == 0) return 1;
  int ret = power(a, n / 2);
  ret = 1LL * ret * ret % mod;
  if (n % 2) ret = 1LL * ret * a % mod;
  return ret;
}
int main() {
  int i, j, s, p, q;
  scanf("%d%d", &n, &x);
  scanf("%s", str);
  len = strlen(str);
  for (i = 0; i <= len; i++) {
    dp[0][i][i] = power(2, mod - 2);
    dp[1][i][i] = power(2, mod - 2);
    if (i == 0 || i == len) dp[0][i][i] = dp[1][i][i] = 1;
  }
  for (i = 0; i < len; i++) {
    dp[str[i] - '0'][i][i + 1]++;
    if (len == 1) f[str[i] - '0']++;
  }
  le[0] = le[1] = 1;
  for (i = 2; i <= x + 1; i++) {
    for (j = 0; j <= len; j++)
      for (s = j; s <= len; s++) {
        if (dp[i - 1][j][s] == 0) continue;
        for (p = s; p <= len; p++) {
          if (dp[i - 2][s][p] == 0 || (j == 0 && s == len && p == len) ||
              (j == 0 && s == 0 && p == len))
            continue;
          dp[i][j][p] =
              (dp[i][j][p] + 1LL * dp[i - 1][j][s] * dp[i - 2][s][p]) % mod;
        }
      }
    f[i] = (f[i - 1] + f[i - 2]) % mod;
    f[i] = (f[i] + dp[i][0][len]) % mod;
    le[i] = (le[i - 1] + le[i - 2]) % (mod - 1);
  }
  int ans = f[x];
  le[x] = (le[x] - len + mod - 1) % (mod - 1);
  ans = 1LL * ans * power(2, le[x]) % mod;
  printf("%d\n", ans);
}
