#include <bits/stdc++.h>
using namespace std;
const int ALPHA = 2;
struct AhoCorasick {
  int nodeCount;
  vector<int> transition[ALPHA];
  vector<bool> term;
  AhoCorasick(vector<string> strs) {
    int maxNodes = 1;
    for (string s : strs) maxNodes += (int)s.length();
    int children[ALPHA][maxNodes];
    memset(children, 0, sizeof(int) * ALPHA * maxNodes);
    bool leaf[maxNodes];
    memset(leaf, false, sizeof(bool) * maxNodes);
    nodeCount = 1;
    for (string s : strs) {
      int node = 0;
      for (char ch : s) {
        int c = ch - '(';
        if (children[c][node] == 0) children[c][node] = nodeCount++;
        node = children[c][node];
      }
      leaf[node] = true;
    }
    for (int i = 0; i < ALPHA; ++i) transition[i].resize(nodeCount);
    term.resize(nodeCount);
    deque<int> q;
    q.push_back(0), q.push_back(0);
    while (q.size()) {
      int node = q.front();
      q.pop_front();
      int suffLink = q.front();
      q.pop_front();
      term[node] = leaf[node] || term[suffLink];
      for (int ch = 0; ch < ALPHA; ++ch) {
        if (children[ch][node] != 0) {
          transition[ch][node] = children[ch][node];
          q.push_back(children[ch][node]);
          q.push_back(node == 0 ? 0 : transition[ch][suffLink]);
        } else {
          transition[ch][node] = transition[ch][suffLink];
        }
      }
    }
  }
};
const int mod = (int)1e9 + 7;
const int LEFT = 0, RIGHT = 1;
const int N = 200 + 10;
int n;
string s;
long long int memo[2][N][N][N];
AhoCorasick *dfa;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> s;
  memset(memo, -1, sizeof(long long int) * 2 * N * N * N);
  dfa = new AhoCorasick({s});
  function<long long int(int, int, int, int)> dp =
      [&](bool done, int open, int close, int aho) -> long long int {
    if (open > n || close > open) {
      return 0;
    }
    if (close == n) {
      return done;
    }
    long long int &ans = memo[done][open][close][aho];
    if (ans != -1) return ans;
    ans = 0;
    int nxt = dfa->transition[LEFT][aho];
    ans += dp(dfa->term[nxt] || done, open + 1, close, nxt);
    nxt = dfa->transition[RIGHT][aho];
    ans += dp(dfa->term[nxt] || done, open, close + 1, nxt);
    return ans %= mod;
  };
  cout << dp(false, 0, 0, 0) << endl;
  return 0;
}
