#include<cstring>
#include<string>
#include<iostream>
#include<cstdio>
using namespace std;
typedef long long int ll;
ll ways[5002][5002];	//ways[length][chances remaining]
#define MOD 1000000007
int main()
{
	int n;
	cin>>n;
	string s;
	cin>>s;
	memset(ways,0,sizeof(ways));
	ways[0][0]=1;
	for(int i=1;i<=n;i++)
	{
		for(int j=0;j<=i;j++)
		{
			if(j>=1)
				ways[j][i]=(ways[j-1][i-1]+(2*ways[j+1][i-1])%MOD)%MOD;
			else
				ways[j][i] = (ways[j][i-1]+(2*ways[j+1][i-1])%MOD)%MOD;
		}
	}
	cout<<ways[s.length()][n]<<endl;
}