#include <iostream>
#include <fstream>
#include <iomanip>
#include <climits>
#include <limits>
#include <algorithm>
#include <vector>
#include <deque>
#include <queue>
#include <list>
#include <stack>
#include <string>
#include <functional>
#include <numeric>
#include <map>
#include <set>
#include <cstdlib>
#include <bitset>
#include <unordered_map>
#include <random>
#include <cmath>
#include <complex>

using namespace std;

typedef long long int ll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef pair<int, int> P;
typedef pair<ll, ll> Pll;
typedef vector<ll> vll;
typedef vector<vector<ll>> vvll;

const int INFL = (int)1e9;
const ll INFLL = (ll)1e18;
const double INFD = numeric_limits<double>::infinity();
const double PI = 3.14159265358979323846;
#define Loop(i, n) for(int i = 0; i < (int)n; i++)
#define Loopll(i, n) for(ll i = 0; i < (ll)n; i++)
#define Loop1(i, n) for(int i = 1; i <= (int)n; i++)
#define Loopll1(i, n) for(ll i = 1; i <= (ll)n; i++)
#define Loopr(i, n) for(int i = (int)n - 1; i >= 0; i--)
#define Looprll(i, n) for(ll i = (ll)n - 1; i >= 0; i--)
#define Loopr1(i, n) for(int i = (int)n; i >= 1; i--)
#define Looprll1(i, n) for(ll i = (ll)n; i >= 1; i--)
#define Loopitr(itr, container) for(auto itr = container.begin(); itr != container.end(); itr++)
#define printv(vector) Loop(i, vector.size()) { cout << vector[i] << " "; } cout << endl;
#define printmx(matrix) Loop(i, matrix.size()) { Loop(j, matrix[i].size()) { cout << matrix[i][j] << " "; } cout << endl; }
#define rnd(d) (ll)((double)(d) + (d >= 0 ? 0.5 : -0.5))
#define floorsqrt(x) ((ll)sqrt((double)x) + ((ll)sqrt((double)x) * (ll)sqrt((double)x) <= (ll)(x) ? 0 : -1))
#define ceilsqrt(x) ((ll)sqrt((double)x) + ((ll)x <= (ll)sqrt((double)x) * (ll)sqrt((double)x) ? 0 : 1))
#define ceildiv(a, b) ((ll)(a) / (ll)(b) + ((ll)(a) % (ll)(b) == 0 ? 0 : 1))
#define bitmanip(m,val) static_cast<bitset<(int)m>>(val)

/*******************************************************/

namespace mod_op {

	const ll MOD = (ll)1e9 + 7;

	class Extended_Euclid {
	private:
		ll m, n;
		vvll mx_multiply(vvll mx1, vvll mx2) {
			vvll ret(mx1.size(), vll(mx2[0].size(), 0));
			Loop(i, mx1.size()) {
				Loop(j, mx1[0].size()) {
					Loop(k, mx2[0].size()) {
						ret[i][j] += mx1[i][k] * mx2[k][j];
					}
				}
			}
			return ret;
		}
	public:
		// solve x, y s.t. mx + ny = gcd(m,n)
		ll x, y, gcd;
		Extended_Euclid(ll M, ll N) {
			m = M;
			n = N;
			vll r(100), k(100);
			bool swapflag = false, m_negflag = false, n_negflag = false;
			if (m < n) { swap(m, n); swapflag = true; }
			if (m < 0) { m *= -1; m_negflag = true; }
			if (n < 0) { n *= -1; n_negflag = true; }
			r[0] = m;
			r[1] = n;
			int h = 1;
			while (1) {
				k[h - 1] = r[h - 1] / r[h];
				r[h + 1] = r[h - 1] % r[h];
				if (r[h + 1] == 0) break;
				h++;
			}
			gcd = r[h];
			vvll mx1 = { { 0, 1 },{ 1, (-1) * k[h - 1] } };
			Loopr(i, h - 1) {
				vvll mx2 = { { 0, 1 },{ 1, (-1) * k[i] } };
				mx1 = mx_multiply(mx1, mx2);
			}
			x = mx1[0][0];
			y = mx1[0][1];
			if (n_negflag) { n *= -1; y *= -1; }
			if (m_negflag) { m *= -1; x *= -1; }
			if (swapflag) { swap(m, n); swap(x, y); }
		}
	};

	class modll {
	private:
		ll mod;
		ll val;
		inline ll modify(ll x) { return x - (x >= 0 ? x : (x - mod + 1)) / mod * mod; }
		inline ll inv(ll x) { if (x == 0) return 1 / x; Extended_Euclid ee(x, -mod); return modify(ee.x); }
	public:
		modll(ll init = 0, ll mod = MOD) { modll::mod = mod; val = modify(init); return; }
		modll(const modll& another) { val = another.val; mod = another.mod; return; }
		inline modll& operator=(const modll &another) { val = modify(another.val); return *this; }
		inline modll operator+(const modll &x) { modll ret = modify(val + x.val); return ret; }
		inline modll operator-(const modll &x) { modll ret = modify(val - x.val); return ret; }
		inline modll operator*(const modll &x) { modll ret = modify(val * x.val); return ret; }
		inline modll operator/(const modll &x) { modll ret = modify(val * inv(x.val)); return ret; }
		inline modll& operator+=(const modll &x) { val = modify(val + x.val); return *this; }
		inline modll& operator-=(const modll &x) { val = modify(val - x.val); return *this; }
		inline modll& operator*=(const modll &x) { val = modify(val * x.val); return *this; }
		inline modll& operator/=(const modll &x) { val = modify(val * inv(x.val)); return *this; }
		friend inline istream& operator >> (istream &is, modll& x) { is >> x.val; return is; }
		friend inline ostream& operator << (ostream &os, modll& x) { os << x.val; return os; }
		ll get_val() { return val; }
		ll get_mod() { return mod; }
	};

	modll pow(modll n, ll p) {
		modll ret;
		if (p == 0) ret = 1;
		else if (p == 1) ret = n;
		else {
			ret = pow(n, p / 2);
			ret *= ret;
			if (p % 2 == 1) ret *= n;
		}
		return ret;
	}
}

using namespace mod_op;

int main() {
	int n; cin >> n;
	string s; cin >> s;
	vector<modll> dp(n + 1, 0);
	dp[0] = 1;
	vector<modll> dpc = dp;
	Loop(i, n) {
		Loop(j, n + 1) {
			if (j == 0) dpc[j] = dp[j] + dp[j + 1];
			else if (j == n) dpc[j] = dp[j - 1] * 2;
			else dpc[j] = dp[j - 1] * modll(2) + dp[j + 1];
		}
		dp = dpc;
	}
	modll ans = dp[s.length()] / pow(modll(2), s.length());
	cout << ans << endl;
}

Measured memory_bytes: 512