#include <bits/stdc++.h>
using namespace std;
template <class T>
using v2d = vector<vector<T> >;
template <class T>
bool uin(T &a, T b) {
  return a > b ? (a = b, true) : false;
}
template <class T>
bool uax(T &a, T b) {
  return a < b ? (a = b, true) : false;
}
mt19937 rng(chrono::system_clock::now().time_since_epoch().count());
const int maxN = 1e2 + 10;
const int maxX = 1e2 + 10;
const long long mod = 1e9 + 7;
int n, x;
char s[maxN];
long long dp[maxX][maxN][maxN], prefix[maxX][maxN], suffix[maxX][maxN],
    pw[maxX], ans[maxX];
long long power(long long a, long long b) {
  long long r = 1;
  while (b) {
    if (b & 1) {
      r = r * a % mod;
    }
    b /= 2;
    a = a * a % mod;
  }
  return r;
}
void solve() {
  cin >> n >> x >> (s + 1);
  for (int i = 1; i <= (int)(n); ++i) {
    if (s[i] == '0') {
      dp[0][i][i] = 1;
    } else {
      dp[1][i][i] = 1;
    }
  }
  pw[0] = pw[1] = 2;
  if (s[1] == '0') {
    prefix[0][1] = 1;
  } else {
    prefix[1][1] = 1;
  }
  if (s[n] == '0') {
    suffix[0][n] = 1;
  } else {
    suffix[1][n] = 1;
  }
  if (n == 1) {
    if (s[1] == '0') {
      ans[0] = 1;
    } else {
      ans[1] = 1;
    }
  }
  for (int d = (int)(2); d <= (int)(x); ++d) {
    pw[d] = pw[d - 1] * pw[d - 2] % mod;
    for (int i = 1; i <= (int)(n); ++i) {
      for (int j = (int)(i); j <= (int)(n); ++j) {
        dp[d][i][j] = dp[d - 1][i][j] + dp[d - 2][i][j];
        for (int k = (int)(i); k <= (int)(j - 1); ++k) {
          dp[d][i][j] += dp[d - 1][i][k] * dp[d - 2][k + 1][j] % mod;
        }
        dp[d][i][j] %= mod;
      }
    }
    for (int i = 1; i <= (int)(n); ++i) {
      prefix[d][i] = prefix[d - 1][i] + prefix[d - 2][i] * pw[d - 1] % mod;
      for (int j = 1; j <= (int)(i - 1); ++j) {
        prefix[d][i] += prefix[d - 1][j] * dp[d - 2][j + 1][i] % mod;
      }
      prefix[d][i] %= mod;
    }
    for (int i = n; i; i--) {
      suffix[d][i] = suffix[d - 2][i] + suffix[d - 1][i] * pw[d - 2];
      for (int j = (int)(i + 1); j <= (int)(n); ++j) {
        suffix[d][i] += suffix[d - 2][j] * dp[d - 1][i][j - 1] % mod;
      }
      suffix[d][i] %= mod;
    }
    ans[d] = ans[d - 1] * pw[d - 2] % mod + ans[d - 2] * pw[d - 1] % mod;
    for (int i = 1; i <= (int)(n - 1); ++i) {
      ans[d] += prefix[d - 1][i] * suffix[d - 2][i + 1] % mod;
    }
    ans[d] %= mod;
  }
  cout << ans[x];
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
