import std.stdio;
import std.conv, std.array, std.algorithm, std.string;
import std.math, std.random, std.range, std.datetime;
import std.bigint;

void main(){
	int n = readln.chomp.to!int;
	string s = readln.chomp;
	
	ulong mod = 1_000_000_007;
	
	ulong[][] dp; // dp[j][i] := # of ways to make (any) string of length i by pressing j times
	foreach(j; 0 .. n + 1){
		dp ~= [0];
		dp[j].length = n;
		foreach(i; 0 .. n){
			if(j == 0){
				if(i == 0) dp[j][i] = 1;
				else dp[j][i] = 0;
				}
			else{
				if(i == 0) dp[j][i] = dp[j - 1][i] + dp[j - 1][i + 1];
				else if(i < n - 1)
						dp[j][i] = dp[j - 1][i - 1] * 2 + dp[j - 1][i + 1];
				else
						dp[j][i] = dp[j - 1][i - 1] * 2;
				}
			dp[j][i] %= mod;
			}
		}
	
	ulong ans = dp[n][s.length];
	foreach(k; s){
		if(ans % 2 == 0) ans /= 2;
		else ans = (ans + mod) / 2;
		}
	
	ans.writeln;
	
	}

