#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const long long INF = 1e18;
template <typename T>
void read(T &x) {
  x = 0;
  int s = 1, c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') s = -1;
  for (; isdigit(c); c = getchar()) x = x * 10 + c - 48;
  x *= s;
}
template <typename T>
void write(T x) {
  if (x < 0) x = -x, putchar('-');
  if (x > 9) write(x / 10);
  putchar(x % 10 + '0');
}
template <typename T>
void writeln(T x) {
  write(x);
  puts("");
}
const int maxn = 2e2 + 5, mod = 1e9 + 7;
int n, len, Next[maxn], to[maxn][2];
char s[maxn];
long long dp[maxn][maxn][maxn][2];
void Get_Next(char *s, int len) {
  Next[1] = 0;
  for (int i = 2, j = 0; i <= len; i++) {
    while (j > 0 && s[i] != s[j + 1]) j = Next[j];
    if (s[i] == s[j + 1]) j++;
    Next[i] = j;
  }
  for (int i = 0; i <= len - 1; i++) {
    int j = i;
    while (j && s[j + 1] != ')') j = Next[j];
    if (s[j + 1] == ')') to[i][1] = j + 1;
    j = i;
    while (j && s[j + 1] != '(') j = Next[j];
    if (s[j + 1] == '(') to[i][0] = j + 1;
  }
}
void Add(long long &x, long long y) {
  x += y;
  if (x >= mod) x -= mod;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> (s + 1);
  len = strlen(s + 1);
  Get_Next(s, len);
  dp[0][0][0][0] = 1;
  n *= 2;
  for (int i = 0; i <= n - 1; i++) {
    for (int k = 0; k <= i; k++) {
      for (int j = 0; j <= min(i, len - 1); j++) {
        Add(dp[i + 1][k + 1][to[j][0]][to[j][0] == len], dp[i][k][j][0]);
        if (k) Add(dp[i + 1][k - 1][to[j][1]][to[j][1] == len], dp[i][k][j][0]);
      }
      Add(dp[i + 1][k + 1][len][1], dp[i][k][len][1]);
      if (k) Add(dp[i + 1][k - 1][len][1], dp[i][k][len][1]);
    }
  }
  cout << dp[n][0][len][1] << endl;
}
