#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int maxn = 100 + 3;
char s[maxn << 1];
int n, m, len, ans, nxt[maxn << 1], Fail[maxn << 1][2],
    f[maxn << 1][maxn << 1][maxn][2];
int fail(int k, char c) {
  while (k && s[k + 1] != c) k = nxt[k];
  return k + (s[k + 1] == c);
}
void Prepare() {
  int k = 0;
  nxt[1] = 0;
  scanf("%d", &n);
  m = n << 1;
  scanf("%s", s + 1);
  len = strlen(s + 1);
  for (int i = 2; i <= len; ++i) nxt[i] = fail(nxt[i - 1], s[i]);
  for (int j = 0; j <= len; ++j) {
    Fail[j][0] = fail(j, '(');
    Fail[j][1] = fail(j, ')');
  }
}
void Dp() {
  int ans = 0, nxtj, *dpv;
  f[0][0][0][0] = 1;
  for (int i = 0; i < m; ++i)
    for (int j = 0; j <= len; ++j)
      for (int k = 0; k <= n; ++k) {
        dpv = f[i][j][k];
        if (dpv[0] + dpv[1] == 0) continue;
        if (k < n) {
          nxtj = Fail[j][0];
          (f[i + 1][nxtj][k + 1][(j == len || nxtj == len)] += dpv[0]) %= mod;
          (f[i + 1][nxtj][k + 1][1] += dpv[1]) %= mod;
        }
        if (k) {
          nxtj = Fail[j][1];
          (f[i + 1][nxtj][k - 1][(j == len || nxtj == len)] += dpv[0]) %= mod;
          (f[i + 1][nxtj][k - 1][1] += dpv[1]) %= mod;
        }
      }
  for (int j = 0; j <= len; ++j) (ans += f[m][j][0][1]) %= mod;
  printf("%d", ans);
}
int main() {
  Prepare();
  Dp();
  return 0;
}
