#include <bits/stdc++.h>
using namespace std;
long long powi(long long a, long long b) {
  if (!b) return 1;
  long long p = powi(a, b / 2);
  p = (p * p) % 1000000007;
  if (b & 1) p = (p * a) % 1000000007;
  return p;
}
long long len[105];
long long po2[105];
long long dp[105][105][105];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  len[0] = len[1] = 1;
  for (int i = 2; i < 105; i++)
    len[i] = (len[i - 1] + len[i - 2]) % (1000000007 - 1);
  for (int i = 0; i < 105; i++) po2[i] = powi(2, len[i]);
  int n, x;
  cin >> n >> x;
  string s;
  cin >> s;
  for (int idx = 0; idx <= x; idx++) {
    for (int i = 2; i <= n; i++) dp[idx][i][i - 1] = 1;
    dp[idx][1][0] = dp[idx][n + 1][n] = po2[idx];
  }
  for (int i = 1; i <= n; i++) dp[s[i - 1] - '0'][i][i] = 1;
  for (int idx = 2; idx <= x; idx++) {
    for (int i = 1; i <= n; i++) {
      for (int j = i; j <= n; j++) {
        for (int k = i; k <= j + 1; k++) {
          dp[idx][i][j] += dp[idx - 1][i][k - 1] * dp[idx - 2][k][j];
          dp[idx][i][j] %= 1000000007;
        }
      }
    }
  }
  cout << dp[x][1][n] << endl;
  return 0;
}
