#include <bits/stdc++.h>
using namespace std;
char a[205];
int n;
int bo[201];
int nxt[201][2];
long long f[201][201][201], mod = 1e9 + 7;
int getnext(int i, char now) {
  if (a[i + 1] == now) return i + 1;
  if (i) return getnext(bo[i], now);
  return 0;
}
void add(long long &x, long long y) { x = (x + y) % mod; }
int main() {
  a[0] = ' ';
  scanf("%d%s", &n, &a[1]);
  n *= 2;
  int len = strlen(a) - 1;
  for (int i = 2; i <= len; i++) bo[i] = getnext(bo[i - 1], a[i]);
  for (int i = 0; i < len; i++)
    for (int j = 0; j <= 1; j++)
      if (j == a[i + 1] - '(')
        nxt[i][j] = i + 1;
      else
        nxt[i][j] = nxt[bo[i]][j];
  nxt[len][0] = nxt[len][1] = len;
  f[0][0][0] = 1;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j <= len; j++)
      for (int k = 0; k <= n; k++) {
        if (k) add(f[i + 1][nxt[j][1]][k - 1], f[i][j][k]);
        add(f[i + 1][nxt[j][0]][k + 1], f[i][j][k]);
      }
  }
  cout << f[n][len][0];
  return 0;
}
