#include <bits/stdc++.h>
using namespace std;
const int N = 505;
const long mod = 1e9 + 7;
int fail[N] = {};
int ch[N][2] = {};
int dp[2][N][N] = {};
string str;
int n;
long long fac(int x) {
  long long ret = 1;
  for (int i = 2; i <= x; i++) ret = ret * i % mod;
  return ret;
}
long long inv(int x) {
  return x == 1 ? 1 : (mod - mod / x) * inv(mod % x) % mod;
}
void build() {
  int p = 0, len = str.size();
  str = "@" + str;
  fail[0] = 0;
  fail[1] = 0;
  for (int i = 2; i <= len; i++) {
    while (p && str[p + 1] != str[i]) p = fail[p];
    if (str[p + 1] == str[i]) p++;
    fail[i] = p;
  }
  ch[0][0] = str[1] == '(';
  ch[0][1] = str[1] == ')';
  for (int i = 1; i < len; i++) {
    ch[i][0] = (str[i + 1] == '(' ? i + 1 : ch[fail[i]][0]);
    ch[i][1] = (str[i + 1] == ')' ? i + 1 : ch[fail[i]][1]);
  }
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> str;
  int len = str.size();
  build();
  dp[0][0][0] = 1;
  for (int i = 1; i <= n + n; i++) {
    int now = i & 1;
    for (int j = 0; j < len; j++) {
      for (int k = 0; k <= n; k++) {
        if (k < n)
          dp[now][ch[j][0]][k + 1] =
              (dp[now][ch[j][0]][k + 1] + dp[now ^ 1][j][k]) % mod;
        if (k > 0)
          dp[now][ch[j][1]][k - 1] =
              (dp[now][ch[j][1]][k - 1] + dp[now ^ 1][j][k]) % mod;
        dp[now ^ 1][j][k] = 0;
      }
    }
  }
  int ans =
      fac(n + n) * inv(fac(n)) % mod * inv(fac(n)) % mod * inv(n + 1) % mod;
  for (int i = 0; i < len; i++) ans = (ans - dp[0][i][0]) % mod;
  if (ans < 0) ans += mod;
  cout << ans << '\n';
  return 0;
}
