#include <bits/stdc++.h>
using namespace std;
istream& in = cin;
const long long mod = 1e9 + 7;
long long dp[110][110][110][4];
string str;
int n, x;
void input() {
  in >> n >> x;
  in >> str;
}
long long pl[110];
void add(long long& a, long long b) {
  a %= mod;
  b %= mod;
  a += b;
  a %= mod;
  if (a < 0) a += mod;
}
long long dfs(int l, int r, int k, int f) {
  assert(l <= r);
  long long& ref = dp[l][r][k][f];
  if (ref != -1) return ref;
  ref = 0;
  if (k == 0) {
    if (l == r && str[l] == '0' && f == 2) {
      ref = 1;
    } else {
      ref = 0;
    }
  } else if (k == 1) {
    if (l == r && str[l] == '1' && f == 2) {
      ref = 1;
    } else {
      ref = 0;
    }
  } else {
    if (f == 0) {
      add(ref, 1 * dfs(l, r, k - 2, 0));
      add(ref, (pl[k - 1] - 1) * dfs(l, r, k - 2, 0));
      add(ref, (pl[k - 1] - 1) * dfs(l, r, k - 2, 2));
      for (int i = l; i < r; ++i) {
        ref = (ref + dfs(l, i, k - 1, 0) * dfs(i + 1, r, k - 2, 2) % mod) % mod;
      }
      add(ref, dfs(l, r, k - 1, 0) * 1);
    } else if (f == 1) {
      add(ref, 1 * dfs(l, r, k - 2, 1));
      for (int i = l; i < r; ++i) {
        ref = (ref + dfs(l, i, k - 1, 2) * dfs(i + 1, r, k - 2, 1) % mod) % mod;
      }
      add(ref, dfs(l, r, k - 1, 1) * pl[k - 2]);
      add(ref, dfs(l, r, k - 1, 2) * (pl[k - 2] - 1));
    } else if (f == 2) {
      add(ref, 1 * dfs(l, r, k - 2, 2));
      for (int i = l; i < r; ++i) {
        ref = (ref + dfs(l, i, k - 1, 2) * dfs(i + 1, r, k - 2, 2) % mod) % mod;
      }
      add(ref, dfs(l, r, k - 1, 2) * 1);
    } else {
      add(ref, dfs(l, r, k - 1, 3) * pl[k - 2]);
      add(ref, dfs(l, r, k - 1, 0) * (pl[k - 2] - 1));
      for (int i = l; i < r; ++i) {
        ref = (ref + dfs(l, i, k - 1, 0) * dfs(i + 1, r, k - 2, 1) % mod) % mod;
      }
      add(ref, (pl[k - 1] - 1) * dfs(l, r, k - 2, 1));
      add(ref, pl[k - 1] * dfs(l, r, k - 2, 3));
    }
  }
  return ref;
}
int main() {
  pl[0] = pl[1] = 2;
  for (int i = 2; i < 110; ++i) pl[i] = pl[i - 1] * pl[i - 2] % mod;
  int TEST_CASE = 1;
  while (TEST_CASE-- > 0) {
    input();
    memset(dp, -1, sizeof(dp));
    cout << (dfs(0, str.length() - 1, x, 0) + dfs(0, str.length() - 1, x, 1) +
             dfs(0, str.length() - 1, x, 2) + dfs(0, str.length() - 1, x, 3)) %
                mod
         << endl;
  }
  return 0;
}
