#include <bits/stdc++.h>
using namespace std;
bool isrange(int second, int first, int n, int m) {
  if (0 <= second && second < n && 0 <= first && first < m) return true;
  return false;
}
int dy[4] = {1, 0, -1, 0}, dx[4] = {0, 1, 0, -1},
    ddy[8] = {1, 0, -1, 0, 1, 1, -1, -1}, ddx[8] = {0, 1, 0, -1, 1, -1, 1, -1};
const long long int mod = 1e9 + 7;
const int MAX = 111;
string a;
int n, first;
long long int dp[MAX][MAX][MAX][4], two[MAX];
long long int dfs(int l, int r, int k, int t) {
  if (dp[l][r][k][t] != -1) return dp[l][r][k][t];
  if (k == 0) {
    if (l != r)
      return 0;
    else {
      if (a[l] == '0') return 1;
      return 0;
    }
  } else if (k == 1) {
    if (l != r)
      return 0;
    else {
      if (a[l] == '1') return 1;
      return 0;
    }
  }
  if (t == 0) {
    long long int f1 = (dfs(l, r, k - 1, 0) * two[k - 2]) % mod;
    f1 = (f1 + dfs(l, r, k - 2, 0) * two[k - 1]) % mod;
    for (int e = l; e < r; e++) {
      long long int v1 = (dfs(l, e, k - 1, 1) * dfs(e + 1, r, k - 2, 2)) % mod;
      f1 = (f1 + v1) % mod;
    }
    return dp[l][r][k][t] = f1;
  }
  if (t == 1) {
    long long int f1 = dfs(l, r, k - 1, 1);
    f1 = (f1 + dfs(l, r, k - 2, 1) * two[k - 1]) % mod;
    for (int e = l; e < r; e++) {
      long long int v1 = (dfs(l, e, k - 1, 1) * dfs(e + 1, r, k - 2, 3)) % mod;
      f1 = (f1 + v1) % mod;
    }
    return dp[l][r][k][t] = f1;
  }
  if (t == 2) {
    long long int f1 = (dfs(l, r, k - 1, 2) * two[k - 2]) % mod;
    f1 = (f1 + dfs(l, r, k - 2, 2)) % mod;
    for (int e = l; e < r; e++) {
      long long int v1 = (dfs(l, e, k - 1, 3) * dfs(e + 1, r, k - 2, 2)) % mod;
      f1 = (f1 + v1) % mod;
    }
    return dp[l][r][k][t] = f1;
  }
  if (t == 3) {
    long long int f1 = dfs(l, r, k - 1, 3);
    f1 = (f1 + dfs(l, r, k - 2, 3)) % mod;
    for (int e = l; e < r; e++) {
      long long int v1 = (dfs(l, e, k - 1, 3) * dfs(e + 1, r, k - 2, 3)) % mod;
      f1 = (f1 + v1) % mod;
    }
    return dp[l][r][k][t] = f1;
  }
}
int main(void) {
  memset(dp, -1, sizeof(dp));
  scanf("%d%d", &n, &first);
  cin >> a;
  two[0] = 2;
  two[1] = 2;
  for (int e = 2; e < MAX; e++) two[e] = (two[e - 1] * two[e - 2]) % mod;
  printf("%lld", dfs(0, n - 1, first, 0));
  return 0;
}

### Prompt

Construct a CPP code solution to the problem outlined:

You are given a binary string s (each character of this string is either 0 or 1).

Let's denote the cost of string t as the number of occurences of s in t. For example, if s is 11 and t is 111011, then the cost of t is 3.

Let's also denote the Fibonacci strings sequence as follows:

  * F(0) is 0;
  * F(1) is 1;
  * F(i) = F(i - 1) + F(i - 2) if i > 1, where  +  means the concatenation of two strings.



Your task is to calculate the sum of costs of all subsequences of the string F(x). Since answer may be large, calculate it modulo 109 + 7.

Input

The first line contains two integers n and x (1 ≤ n ≤ 100, 0 ≤ x ≤ 100) — the length of s and the index of a Fibonacci string you are interested in, respectively.

The second line contains s — a string consisting of n characters. Each of these characters is either 0 or 1.

Output

Print the only integer — the sum of costs of all subsequences of the string F(x), taken modulo 109 + 7. 

Examples

Input

2 4
11


Output

14


Input

10 100
1010101010


Output

553403224

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
bool isrange(int second, int first, int n, int m) {
  if (0 <= second && second < n && 0 <= first && first < m) return true;
  return false;
}
int dy[4] = {1, 0, -1, 0}, dx[4] = {0, 1, 0, -1},
    ddy[8] = {1, 0, -1, 0, 1, 1, -1, -1}, ddx[8] = {0, 1, 0, -1, 1, -1, 1, -1};
const long long int mod = 1e9 + 7;
const int MAX = 111;
string a;
int n, first;
long long int dp[MAX][MAX][MAX][4], two[MAX];
long long int dfs(int l, int r, int k, int t) {
  if (dp[l][r][k][t] != -1) return dp[l][r][k][t];
  if (k == 0) {
    if (l != r)
      return 0;
    else {
      if (a[l] == '0') return 1;
      return 0;
    }
  } else if (k == 1) {
    if (l != r)
      return 0;
    else {
      if (a[l] == '1') return 1;
      return 0;
    }
  }
  if (t == 0) {
    long long int f1 = (dfs(l, r, k - 1, 0) * two[k - 2]) % mod;
    f1 = (f1 + dfs(l, r, k - 2, 0) * two[k - 1]) % mod;
    for (int e = l; e < r; e++) {
      long long int v1 = (dfs(l, e, k - 1, 1) * dfs(e + 1, r, k - 2, 2)) % mod;
      f1 = (f1 + v1) % mod;
    }
    return dp[l][r][k][t] = f1;
  }
  if (t == 1) {
    long long int f1 = dfs(l, r, k - 1, 1);
    f1 = (f1 + dfs(l, r, k - 2, 1) * two[k - 1]) % mod;
    for (int e = l; e < r; e++) {
      long long int v1 = (dfs(l, e, k - 1, 1) * dfs(e + 1, r, k - 2, 3)) % mod;
      f1 = (f1 + v1) % mod;
    }
    return dp[l][r][k][t] = f1;
  }
  if (t == 2) {
    long long int f1 = (dfs(l, r, k - 1, 2) * two[k - 2]) % mod;
    f1 = (f1 + dfs(l, r, k - 2, 2)) % mod;
    for (int e = l; e < r; e++) {
      long long int v1 = (dfs(l, e, k - 1, 3) * dfs(e + 1, r, k - 2, 2)) % mod;
      f1 = (f1 + v1) % mod;
    }
    return dp[l][r][k][t] = f1;
  }
  if (t == 3) {
    long long int f1 = dfs(l, r, k - 1, 3);
    f1 = (f1 + dfs(l, r, k - 2, 3)) % mod;
    for (int e = l; e < r; e++) {
      long long int v1 = (dfs(l, e, k - 1, 3) * dfs(e + 1, r, k - 2, 3)) % mod;
      f1 = (f1 + v1) % mod;
    }
    return dp[l][r][k][t] = f1;
  }
}
int main(void) {
  memset(dp, -1, sizeof(dp));
  scanf("%d%d", &n, &first);
  cin >> a;
  two[0] = 2;
  two[1] = 2;
  for (int e = 2; e < MAX; e++) two[e] = (two[e - 1] * two[e - 2]) % mod;
  printf("%lld", dfs(0, n - 1, first, 0));
  return 0;
}

```