#include <bits/stdc++.h>
using namespace std;
long long int INF = 3e18;
const long long fact_table = 800008;
double Pi = 3.1415926535897932384626;
vector<pair<long long, long long> > tree[500010];
priority_queue<long long> pql;
priority_queue<pair<long long, long long> > pqp;
priority_queue<long long, vector<long long>, greater<long long> > pqls;
priority_queue<pair<long long, long long>, vector<pair<long long, long long> >,
               greater<pair<long long, long long> > >
    pqps;
long long dx[8] = {1, 0, -1, 0, 1, 1, -1, -1};
long long dy[8] = {0, 1, 0, -1, 1, -1, -1, 1};
char dir[] = "DRUL";
long long mod = 1000000007;
long long rui(long long number1, long long number2) {
  if (number2 == 0) {
    return 1;
  } else {
    long long number3 = rui(number1, number2 / 2);
    number3 *= number3;
    number3 %= mod;
    if (number2 % 2 == 1) {
      number3 *= number1;
      number3 %= mod;
    }
    return number3;
  }
}
long long gcd(long long number1, long long number2) {
  if (number1 > number2) {
    swap(number1, number2);
  }
  if (number1 == 0 || number1 == number2) {
    return number2;
  } else {
    return gcd(number2 % number1, number1);
  }
}
void YES(bool condition) {
  if (condition) {
    cout << "YES"
         << "\n";
    ;
  } else {
    cout << "NO"
         << "\n";
    ;
  }
  return;
}
void Yes(bool condition) {
  if (condition) {
    cout << "Yes"
         << "\n";
    ;
  } else {
    cout << "No"
         << "\n";
    ;
  }
  return;
}
long long n, m, num, sum, a, b, c, d, e, g, h, w, i, j, q, r, l;
long long k;
long long ans;
long long x[100005], y[500005], z[200005];
char s[500005];
long long dp[104][104][104];
long long query;
long long len[105];
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> n >> k;
  cin >> s;
  m = n;
  n = k;
  for (long long i = 0; i < m; i++) {
    if (s[i] == '1') {
      dp[1][i][i] = 1;
    } else {
      dp[0][i][i] = 1;
    }
  }
  len[0] = 2;
  len[1] = 2;
  for (long long i = 2; i <= n; i++) {
    len[i] = len[i - 1] * len[i - 2];
    len[i] %= mod;
  }
  for (long long i = 2; i <= n; i++) {
    for (long long j = 0; j < m; j++) {
      for (long long k = j; k < m; k++) {
        if (j == 0 && k == m - 1) {
          dp[i][j][k] +=
              dp[i - 1][j][k] * len[i - 2] + dp[i - 2][j][k] * len[i - 1];
        } else if (j == 0) {
          dp[i][j][k] += dp[i - 1][j][k] + dp[i - 2][j][k] * len[i - 1];
        } else if (k == m - 1) {
          dp[i][j][k] += dp[i - 2][j][k] + dp[i - 1][j][k] * len[i - 2];
        } else {
          dp[i][j][k] += dp[i - 1][j][k] + dp[i - 2][j][k];
        }
        dp[i][j][k] %= mod;
        for (long long l = j; l < k; l++) {
          dp[i][j][k] += dp[i - 1][j][l] * dp[i - 2][l + 1][k];
          dp[i][j][k] %= mod;
        }
        dp[i][j][k] %= mod;
      }
    }
  }
  ans = dp[n][0][m - 1];
  cout << ans << "\n";
  ;
  return 0;
}
