#include <bits/stdc++.h>
using namespace std;
long long ori[101][101][101];
long long suff[101][101][101];
long long pref[101][101][101];
long long exac[101][101][101];
string s;
long long fib[101];
long long two[101];
inline int mul(int x, int y) { return (long long)x * y % 1000000007; }
int fe(int x, int k) {
  int res = 1;
  while (k) {
    if (k & 1) res = mul(res, x);
    x = mul(x, x);
    k >>= 1;
  }
  return res;
}
long long bigmod(long long a, long long b) {
  if (b == 0) {
    return 1;
  }
  if (b % 2 == 0) {
    long long r = bigmod(a, b / 2);
    r = r * r;
    r = r % 1000000007;
    return r;
  } else {
    long long r = bigmod(a, b - 1);
    r = r * a;
    r = r % 1000000007;
    return r;
  }
}
int main() {
  fib[0] = fib[1] = 1;
  for (int i = 2; i < 101; i++) {
    fib[i] = (fib[i - 1] + fib[i - 2]) % (1000000007 - 1);
  }
  for (int i = 0; i < 101; i++) {
    two[i] = fe(2, fib[i]);
  }
  int n, x;
  scanf("%d %d\n", &n, &x);
  getline(cin, s);
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '0') {
      ori[0][i][i] = 1;
      suff[0][i][i] = 1;
      pref[0][i][i] = 1;
      exac[0][i][i] = 1;
    } else {
      ori[1][i][i] = 1;
      suff[1][i][i] = 1;
      pref[1][i][i] = 1;
      exac[1][i][i] = 1;
    }
  }
  for (int i = 2; i <= x; i++) {
    for (int j = 0; j < n; j++) {
      for (int k = j; k < n; k++) {
        ori[i][j][k] += (ori[i - 1][j][k] * two[i - 2]) % 1000000007;
        ori[i][j][k] %= 1000000007;
        ori[i][j][k] += (ori[i - 2][j][k] * two[i - 1]) % 1000000007;
        ori[i][j][k] %= 1000000007;
        suff[i][j][k] += suff[i - 1][j][k];
        suff[i][j][k] %= 1000000007;
        suff[i][j][k] += (two[i - 1] * suff[i - 2][j][k]) % 1000000007;
        suff[i][j][k] %= 1000000007;
        pref[i][j][k] += pref[i - 2][j][k];
        pref[i][j][k] %= 1000000007;
        pref[i][j][k] += (pref[i - 1][j][k] * two[i - 2]) % 1000000007;
        pref[i][j][k] %= 1000000007;
        exac[i][j][k] += exac[i - 1][j][k];
        exac[i][j][k] %= 1000000007;
        exac[i][j][k] += exac[i - 2][j][k];
        exac[i][j][k] %= 1000000007;
        for (int l = j; l < k; l++) {
          ori[i][j][k] +=
              (suff[i - 1][j][l] * pref[i - 2][l + 1][k]) % 1000000007;
          ori[i][j][k] %= 1000000007;
          suff[i][j][k] +=
              (suff[i - 1][j][l] * exac[i - 2][l + 1][k]) % 1000000007;
          suff[i][j][k] %= 1000000007;
          pref[i][j][k] +=
              (exac[i - 1][j][l] * pref[i - 2][l + 1][k]) % 1000000007;
          pref[i][j][k] %= 1000000007;
          exac[i][j][k] +=
              (exac[i - 1][j][l] * exac[i - 2][l + 1][k]) % 1000000007;
          exac[i][j][k] %= 1000000007;
        }
      }
    }
  }
  long long ans = ori[x][0][n - 1];
  cout << ans << endl;
  return 0;
}
