#include <bits/stdc++.h>
using namespace std;
const int N = 210;
const int M = 510;
const int MOD = 1e9 + 7;
template <const int SIZE, const int SIGMA>
struct Automata {
  int states, trie[SIZE][SIGMA], out[SIZE], fail[SIZE];
  Automata() {
    states = 0;
    memset(out, 0, sizeof out);
    memset(fail, -1, sizeof fail);
    memset(trie, -1, sizeof trie);
  }
  void add(const string &pattern) {
    int u = 0;
    for (int i = 0; i < (int)pattern.size(); ++i) {
      int c = pattern[i] - '0';
      if (trie[u][c] == -1) trie[u][c] = ++states;
      u = trie[u][c];
    }
    out[u] = 1;
  }
  void run() {
    queue<int> q;
    for (int i = 0; i < SIGMA; ++i) {
      int &t = trie[0][i];
      if (t == -1) {
        t = 0;
      } else {
        fail[t] = 0;
        q.push(t);
      }
    }
    while (!q.empty()) {
      int u = q.front();
      q.pop();
      for (int i = 0; i < SIGMA; ++i) {
        if (trie[u][i] != -1) {
          int f = fail[u];
          while (trie[f][i] == -1) f = fail[f];
          f = trie[f][i];
          int t = trie[u][i];
          fail[t] = f;
          out[t] |= out[f];
          q.push(t);
        }
      }
    }
  }
  int next(int u, int c) {
    while (trie[u][c] == -1) u = fail[u];
    return trie[u][c];
  }
};
Automata<M, 2> aho;
int len, dp[N][N][M][2];
int solve(int i, int open, int cur, int yep) {
  if (i == len) return !open and yep;
  int &res = dp[i][open][cur][yep];
  if (res == -1) {
    int nxt = aho.next(cur, 0);
    res = solve(i + 1, open + 1, nxt, yep or aho.out[nxt]);
    if (res >= MOD) res -= MOD;
    if (open) {
      int nxt = aho.next(cur, 1);
      res += solve(i + 1, open - 1, nxt, yep or aho.out[nxt]);
      if (res >= MOD) res -= MOD;
    }
  }
  return res;
}
char pattern[N];
int main() {
  scanf("%d %s", &len, pattern);
  len <<= 1;
  int n = strlen(pattern);
  for (int i = 0; i < n; ++i) pattern[i] = pattern[i] == '(' ? '0' : '1';
  aho.add(pattern);
  aho.run();
  memset(dp, -1, sizeof dp);
  printf("%d\n", solve(0, 0, 0, 0));
  return 0;
}
