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

#define int long long
#define double long double
#define rep(i, n) for (int i = 0; i < (int) n; i++)
#define reps(i, n) for (int i = 1; i <= (int) n; i++)
#define all(x) (x).begin(), (x).end()
#define bit(n) (1LL << (n))
#define dump(x) cerr << #x " = " << x << endl
using vint = vector<int>;
using vvint = vector<vint>;
using pint = pair<int, int>;
constexpr double pi = 3.1415926535897932384626433832795028;
constexpr int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
constexpr int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
inline int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
inline int lcm(int a, int b) { return a / gcd(a, b) * b; }
template<typename T> using reversed_priority_queue = priority_queue<T, vector<T>, greater<T>>;
template<typename T1, typename T2> inline bool chmax(T1 &a, const T2 &b) { return a < b && (a = b, true); }
template<typename T1, typename T2> inline bool chmin(T1 &a, const T2 &b) { return b < a && (a = b, true); }
struct SetUp { SetUp() { cout << fixed << setprecision(20); }; } setUp;

template<int MOD = 1000000007>
struct ModInt {
    int val;
    ModInt() : val(0) {}
    ModInt(long long val_) : val(val_ >= 0 ? val_ % MOD : (MOD - (-val_) % MOD) % MOD) {}
    ModInt &operator+=(const ModInt &p) {
        if ((val += p.val) >= MOD) { val -= MOD; }
        return *this;
    }
    ModInt &operator-=(const ModInt &p) {
        if ((val += MOD - p.val) >= MOD) { val -= MOD; }
        return *this;
    }
    ModInt &operator*=(const ModInt &p) {
        val = (int) ((long long) val * p.val % MOD);
        return *this;
    }
    ModInt &operator/=(const ModInt &p) {
        int a = p.val, b = MOD, u = 1, v = 0;
        while (b > 0) {
            int t = a / b;
            std::swap(a -= t * b, b);
            std::swap(u -= t * v, v);
        }
        *this *= ModInt(u);
        return *this;
    }
    ModInt operator-() const { return ModInt(-val); }
    ModInt operator+(const ModInt &p) const { return ModInt(*this) += p; }
    ModInt operator-(const ModInt &p) const { return ModInt(*this) -= p; }
    ModInt operator*(const ModInt &p) const { return ModInt(*this) *= p; }
    ModInt operator/(const ModInt &p) const { return ModInt(*this) /= p; }
    bool operator==(const ModInt &p) const { return val == p.val; }
    bool operator!=(const ModInt &p) const { return val != p.val; }
    ModInt pow(long long n) const {
        ModInt ret(1), mul(val);
        while (n > 0) {
            if (n & 1) { ret *= mul; }
            mul *= mul;
            n >>= 1;
        }
        return ret;
    }
    friend std::istream &operator>>(std::istream &is, ModInt &p) {
        long long v;
        is >> v;
        p = ModInt<MOD>(v);
        return (is);
    }
    friend std::ostream &operator<<(std::ostream &os, const ModInt &p) { return os << p.val; }
};

int N;
string s;
using mint = ModInt<>;
mint dp[5500][5500];
signed main() {
    cin >> N >> s;
    dp[0][0] = 1;
    rep(i, N) {
        rep(j, N) {
            dp[i + 1][j + 1] += dp[i][j] * 2;
            if (j > 0) { dp[i + 1][j - 1] += dp[i][j]; }
            else { dp[i + 1][j] += dp[i][j]; }
        }
    }
    cout << dp[N][s.length()] / mint(2).pow(s.length()) << endl;

}

Measured memory_bytes: 236672