#include <bits/stdc++.h>
using namespace std;
const int maxn = 210;
const int mod = 1000000007;
char s[maxn];
int f[maxn][maxn][maxn], Next[maxn];
int len;
void get_next(void) {
  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;
  }
}
int get_pos(int pos, char ch) {
  while (pos && (pos == len || ch != s[pos + 1])) pos = Next[pos];
  if (s[pos + 1] == ch) pos++;
  return pos;
}
int main() {
  int n;
  scanf("%d", &n);
  scanf("%s", s + 1);
  len = strlen(s + 1);
  get_next();
  f[0][0][0] = 1;
  for (int i = 0; i < 2 * n; i++)
    for (int j = 0; j <= len; j++)
      for (int k = 0; k <= n; k++) {
        if (j == len) {
          f[i + 1][j][k + 1] = (f[i + 1][j][k + 1] + f[i][j][k]) % mod;
          f[i + 1][j][k - 1] = (f[i + 1][j][k - 1] + f[i][j][k]) % mod;
          continue;
        }
        int pos = get_pos(j, '(');
        f[i + 1][pos][k + 1] = (f[i + 1][pos][k + 1] + f[i][j][k]) % mod;
        if (k > 0) {
          pos = get_pos(j, ')');
          f[i + 1][pos][k - 1] = (f[i + 1][pos][k - 1] + f[i][j][k]) % mod;
        }
      }
  cout << f[2 * n][len][0] << endl;
}
