#include <bits/stdc++.h>
using namespace std;
template <class T>
bool umin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool umax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
int n, k;
const int N = 105;
char s[N];
long long f[N];
int pw[N], dp[N][N][N];
int mod(long long x) { return (x % 1000000007); }
int rec(int l, int r, int lvl) {
  if (!lvl) return (l == r and s[l] == '0');
  if (lvl == 1) return (l == r and s[l] == '1');
  int& ret = dp[l][r][lvl];
  if (~ret) return ret;
  ret = 0;
  if (!l)
    ret = mod(ret + mod(rec(l, r, lvl - 2) * 1LL * pw[lvl - 1]));
  else
    ret = mod(ret + rec(l, r, lvl - 2));
  if (r == n - 1)
    ret = mod(ret + mod(rec(l, r, lvl - 1) * 1LL * pw[lvl - 2]));
  else
    ret = mod(ret + rec(l, r, lvl - 1));
  for (int k = l; k < r; k++)
    ret = mod(ret + mod(rec(l, k, lvl - 1) * 1LL * rec(k + 1, r, lvl - 2)));
  return ret;
}
int main() {
  scanf("%d%d", &n, &k);
  scanf("%s", s);
  pw[0] = pw[1] = 2;
  for (int i = 2; i < N; i++) pw[i] = mod(pw[i - 1] * 1LL * pw[i - 2]);
  memset(dp, -1, sizeof dp);
  printf("%d\n", rec(0, n - 1, k));
  return 0;
}
