#include <bits/stdc++.h>
using namespace std;

const int N = 5005;
const int mod = 1e9 + 7;

int dp[N][N]; // total yang di tulisan sekarang, index ke berapa;
int n, m;

char str[N];

int f(int tot, int idx){

	if(idx == n){

		if(tot == m)
			return 1;
		else
			return 0;
	
	}

	int &ret = dp[tot][idx];

	if(ret != -1)
		return ret;

	ret = 0;

	// ada yang dihapus
	if(tot > 0)
		ret = (ret + 2*f(tot-1, idx+1))%mod;
	// gak ada yang dihapus
	else
		ret = (ret + f(0, idx+1));

	// pencet x
	ret = (ret + f(tot+1, idx+1))%mod;

	return ret;
}


int main(){
	memset(dp, -1, sizeof(dp));
	scanf("%d", &n);
	scanf("%s", str);

	m = strlen(str);

	printf("%d\n", f(0, 0));
}