#include <bits/stdc++.h>
using namespace std;
int fx[] = {1, -1, 0, 0};
int fy[] = {0, 0, 1, -1};
int n, x;
string s;
long long bm(long long base, long long power) {
  if (power == 0) {
    return 1;
  }
  if (power % 2 == 0) {
    long long ret = bm(base, power / 2);
    return (ret * ret) % 1000000007;
  } else {
    return (base * bm(base, power - 1)) % 1000000007;
  }
}
long long fibdp[110];
long long fib(int yo) {
  if (yo == 0 || yo == 1) {
    return 1;
  }
  if (fibdp[yo] != -1) {
    return fibdp[yo];
  }
  return fibdp[yo] = (fib(yo - 1) + fib(yo - 2)) % (1000000007 - 1);
}
long long dp[110][110][110][4];
long long func(int pos, int le, int ri, int beep) {
  if (pos == 0 || pos == 1) {
    if (le == ri) {
    } else {
      return 0;
    }
    if (pos == 0 && s[le] == '0') {
      return 1;
    }
    if (pos == 1 && s[le] == '1') {
      return 1;
    }
    return 0;
  }
  if (dp[pos][le][ri][beep] != -1) {
    return dp[pos][le][ri][beep];
  }
  int ans = 0;
  for (int i = le; i <= ri - 1; i++) {
    if (beep == 0) {
      ans +=
          (func(pos - 1, le, i, 2) * func(pos - 2, i + 1, ri, 1)) % 1000000007;
      ans %= 1000000007;
    }
    if (beep == 1) {
      ans +=
          (func(pos - 1, le, i, 3) * func(pos - 2, i + 1, ri, 1)) % 1000000007;
      ans %= 1000000007;
    }
    if (beep == 2) {
      ans +=
          (func(pos - 1, le, i, 2) * func(pos - 2, i + 1, ri, 3)) % 1000000007;
      ans %= 1000000007;
    }
    if (beep == 3) {
      ans +=
          (func(pos - 1, le, i, 3) * func(pos - 2, i + 1, ri, 3)) % 1000000007;
      ans %= 1000000007;
    }
  }
  if (beep == 0) {
    ans += (func(pos - 1, le, ri, 0) * bm(2, fib(pos - 2))) % 1000000007;
    ans %= 1000000007;
    ans += (func(pos - 2, le, ri, 0) * bm(2, fib(pos - 1))) % 1000000007;
    ans %= 1000000007;
  }
  if (beep == 1) {
    ans += (func(pos - 1, le, ri, 1) * bm(2, fib(pos - 2))) % 1000000007;
    ans %= 1000000007;
    ans += func(pos - 2, le, ri, 1);
    ans %= 1000000007;
  }
  if (beep == 2) {
    ans += func(pos - 1, le, ri, 2);
    ans %= 1000000007;
    ans += (bm(2, fib(pos - 1)) * func(pos - 2, le, ri, 2)) % 1000000007;
    ans %= 1000000007;
  }
  if (beep == 3) {
    ans += func(pos - 1, le, ri, 3);
    ans %= 1000000007;
    ans += func(pos - 2, le, ri, 3);
    ans %= 1000000007;
  }
  return dp[pos][le][ri][beep] = ans;
}
int main() {
  std::ios_base::sync_with_stdio(false);
  cin >> n >> x;
  cin >> s;
  memset(fibdp, -1, sizeof(fibdp));
  memset(dp, -1, sizeof(dp));
  cout << func(x, 0, s.size() - 1, 0) << "\n";
  return 0;
}
