#include <bits/stdc++.h>
using namespace std;
template <typename T>
T gcd(T x, T y) {
  if (x < y) swap(x, y);
  while (y > 0) {
    T f = x % y;
    x = y;
    y = f;
  }
  return x;
}
void exgcd(long long a, long long b, long long &d, long long &x, long long &y) {
  if (!b) {
    d = a;
    x = 1;
    y = 0;
  } else {
    exgcd(b, a % b, d, y, x);
    y -= x * (a / b);
  }
}
long long inv(long long a, long long m) {
  long long x, y, d;
  exgcd(a, m, d, x, y);
  return d == 1 ? ((x % m) + m) % m : -1;
}
long long MOD = 1e9 + 7;
int n, x;
char s[111];
long long pf2[111];
long long dp[111][111][111];
long long solve(int fr, int to, int k) {
  if (k == 0) return fr == to && s[fr] == '0';
  if (k == 1) return fr == to && s[fr] == '1';
  long long &r = dp[fr][to][k];
  if (r >= 0) return r;
  r = 0;
  r = (r + ((fr == 0 ? pf2[k - 1] : 1ll) * solve(fr, to, k - 2) % MOD)) % MOD;
  r = (r + (solve(fr, to, k - 1) * (to == n - 1 ? pf2[k - 2] : 1ll) % MOD)) %
      MOD;
  for (int m = fr; m < to; m++) {
    r = (r + (solve(fr, m, k - 1) * solve(m + 1, to, k - 2) % MOD)) % MOD;
  }
  return r;
}
int main(int argc, char *argv[]) {
  std::cin.sync_with_stdio(false);
  std::cin.tie(nullptr);
  cin >> n >> x >> s;
  {
    pf2[0] = 2;
    pf2[1] = 2;
    for (int i = 2; i <= x; i++) pf2[i] = (pf2[i - 1] * pf2[i - 2]) % MOD;
    memset(dp, -1, sizeof(dp));
    cout << solve(0, n - 1, x) << endl;
  }
  return 0;
}
