#include <bits/stdc++.h>
using namespace std;
int dp[211][211][211][2], nxt[211 * 211], n, len, ans, jump[211][2];
char s[211 * 211];
void find_next() {
  int j;
  for (int i = 1; i < len; i++) {
    j = nxt[i];
    while (j && s[i] != s[j]) {
      j = nxt[j];
    }
    nxt[i + 1] = j + 1;
  }
}
void ycl() {
  for (int i = 0; i <= len; i++) {
    if (s[i + 1] == '(') {
      jump[i][0] = i + 1;
      int temp = nxt[i + 1];
      while (temp && s[temp] != ')') {
        temp = nxt[temp];
      }
      jump[i][1] = temp;
    } else if (s[i + 1] == ')') {
      jump[i][1] = i + 1;
      int temp = nxt[i + 1];
      while (temp && s[temp] != '(') {
        temp = nxt[temp];
      }
      jump[i][0] = temp;
    }
  }
}
int main() {
  scanf("%d%s", &n, s + 1);
  len = strlen(s + 1);
  find_next();
  ycl();
  dp[0][0][0][0] = 1;
  for (int i = 0; i < n * 2; i++) {
    for (int j = 0; j <= n; j++) {
      for (int k = 0; k <= len; k++) {
        for (int ii = 0; ii <= 1; ii++) {
          if (s[k + 1] == '(') {
            if (j < n)
              dp[i + 1][j + 1][k + 1][ii | (k + 1 == len)] =
                  (dp[i + 1][j + 1][k + 1][ii | (k + 1 == len)] +
                   dp[i][j][k][ii]) %
                  1000000007;
            int temp = jump[k][1];
            if (j > 0)
              dp[i + 1][j - 1][temp][ii | (temp == len)] =
                  (dp[i + 1][j - 1][temp][ii | (temp == len)] +
                   dp[i][j][k][ii]) %
                  1000000007;
          } else if (s[k + 1] == ')') {
            if (j > 0)
              dp[i + 1][j - 1][k + 1][ii | (k + 1 == len)] =
                  (dp[i + 1][j - 1][k + 1][ii | (k + 1 == len)] +
                   dp[i][j][k][ii]) %
                  1000000007;
            int temp = jump[k][0];
            if (j < n)
              dp[i + 1][j + 1][temp][ii | (temp == len)] =
                  (dp[i + 1][j + 1][temp][ii | (temp == len)] +
                   dp[i][j][k][ii]) %
                  1000000007;
          } else if (k == len) {
            int temp = nxt[k + 1];
            while (temp && s[temp] != '(') {
              temp = nxt[temp];
            }
            if (j < n)
              dp[i + 1][j + 1][temp][ii | (temp == len)] =
                  (dp[i + 1][j + 1][temp][ii | (temp == len)] +
                   dp[i][j][k][ii]) %
                  1000000007;
            temp = nxt[k + 1];
            while (temp && s[temp] != ')') {
              temp = nxt[temp];
            }
            if (j > 0)
              dp[i + 1][j - 1][temp][ii | (temp == len)] =
                  (dp[i + 1][j - 1][temp][ii | (temp == len)] +
                   dp[i][j][k][ii]) %
                  1000000007;
          }
        }
      }
    }
  }
  for (int i = 0; i <= len; i++) {
    ans += dp[n * 2][0][i][1];
    ans %= 1000000007;
  }
  printf("%d", ans);
  return 0;
}
