#include <bits/stdc++.h>
using namespace std;
char s[1005];
long long v[105], dp[105][105][105];
int main() {
  long long n, m, i, x, y, st, dr, k;
  scanf("%lld%lld", &n, &m);
  scanf("%s", s + 1);
  for (i = 1; i <= n; i++) dp[s[i] - '0'][i][i] = 1;
  v[0] = v[1] = 2;
  for (i = 2; i <= m; i++) v[i] = (v[i - 1] * v[i - 2]) % 1000000007;
  for (i = 2; i <= m; i++)
    for (st = 1; st <= n; st++)
      for (dr = 1; dr <= n; dr++) {
        x = y = 1;
        if (st == 1) x = v[i - 1];
        if (dr == n) y = v[i - 2];
        dp[i][st][dr] = (dp[i - 1][st][dr] * y % 1000000007 +
                         dp[i - 2][st][dr] * x % 1000000007) %
                        1000000007;
        for (k = st; k < dr; k++)
          dp[i][st][dr] =
              (dp[i][st][dr] + dp[i - 1][st][k] * dp[i - 2][k + 1][dr]) %
              1000000007;
      }
  printf("%lld", dp[m][1][n]);
  return 0;
}
