#include <bits/stdc++.h>
using namespace std;
int n, len, ans, giv[201], nxt[201], c[202], cnt[201][2], dp[201][101][201][2];
char s[201];
void getnxt() {
  int num = 0;
  for (int i = 2; i <= len; i++) {
    while (num && giv[num + 1] != giv[i]) num = nxt[num];
    if (giv[num + 1] == giv[i]) num++;
    nxt[i] = num;
  }
}
void KMP(int x, int y) {
  int num = 0;
  for (int i = 1; i <= x + 1; i++) {
    while (num && giv[num + 1] != c[i]) num = nxt[num];
    if (giv[num + 1] == c[i]) num++;
  }
  cnt[x][y] = num;
}
void calc() {
  memset(c, -1, sizeof(c));
  for (int i = 0; i <= len; i++) c[i] = giv[i], c[i + 1] = 0, KMP(i, 0);
  memset(c, -1, sizeof(c));
  for (int i = 0; i <= len; i++) c[i] = giv[i], c[i + 1] = 1, KMP(i, 1);
}
int main() {
  memset(giv, -1, sizeof(giv));
  scanf("%d", &n);
  n *= 2;
  scanf("%s", s + 1);
  len = strlen(s + 1);
  for (int i = 1; i <= len; i++) {
    if (s[i] == '(') giv[i] = 0;
    if (s[i] == ')') giv[i] = 1;
  }
  getnxt();
  calc();
  dp[0][0][0][0] = 1;
  for (int i = 0; i < n; i++)
    for (int j = 0; j <= n / 2; j++)
      for (int k = 0; k <= len; k++)
        for (int l = 0; l <= 1; l++) {
          if (!dp[i][j][k][l]) continue;
          if (j < n / 2)
            (dp[i + 1][j + 1][cnt[k][0]][l | (cnt[k][0] == len)] +=
             dp[i][j][k][l]) %= 1000000007;
          if (j > 0)
            (dp[i + 1][j - 1][cnt[k][1]][l | (cnt[k][1] == len)] +=
             dp[i][j][k][l]) %= 1000000007;
        }
  for (int i = 0; i <= len; i++) (ans += dp[n][0][i][1]) %= 1000000007;
  printf("%d\n", ans);
  return 0;
}
