#include <bits/stdc++.h>
using namespace std;
const int max_n = 222, mod = (int)1e9 + 7;
int n, p[max_n], to[max_n][2], dp[max_n][max_n], dp_bad[max_n][max_n][max_n];
string s;
void add(int &num, int to_add) {
  num += to_add;
  if (num >= mod) {
    num -= mod;
  }
}
void get_prefix_function(const string &s, int p[]) {
  p[0] = 0;
  for (int i = 1; i < s.length(); i++) {
    p[i] = p[i - 1];
    while (p[i] > 0 && s[i] != s[p[i]]) {
      p[i] = p[p[i] - 1];
    }
    if (s[i] == s[p[i]]) {
      p[i]++;
    }
  }
}
int calc_all() {
  dp[0][0] = 1;
  for (int i = 0; i < 2 * n; i++) {
    for (int bal = 0; bal <= i; bal++) {
      add(dp[i + 1][bal + 1], dp[i][bal]);
      if (bal) {
        add(dp[i + 1][bal - 1], dp[i][bal]);
      }
    }
  }
  return dp[2 * n][0];
}
int calc_bad() {
  dp_bad[0][0][0] = 1;
  for (int i = 0; i < 2 * n; i++) {
    for (int bal = 0; bal <= i; bal++) {
      for (int cnt = 0; cnt < s.length(); cnt++) {
        for (int tp = 0; tp < 2; tp++) {
          int nbal = bal;
          if (tp == 0) {
            nbal++;
          } else {
            nbal--;
          }
          if (nbal >= 0) {
            add(dp_bad[i + 1][nbal][to[cnt][tp]], dp_bad[i][bal][cnt]);
          }
        }
      }
    }
  }
  int res = 0;
  for (int cnt = 0; cnt < s.length(); cnt++) {
    add(res, dp_bad[2 * n][0][cnt]);
  }
  return res;
}
int main() {
  cin >> n >> s;
  get_prefix_function(s, p);
  for (int cnt = 0; cnt < s.length(); cnt++) {
    for (int tp = 0; tp < 2; tp++) {
      char ch = '(' + tp;
      int cur = cnt;
      while (cur && s[cur] != ch) {
        cur = p[cur - 1];
      }
      if (s[cur] == ch) {
        cur++;
      }
      to[cnt][tp] = cur;
    }
  }
  int all = calc_all();
  int bad = calc_bad();
  int ans = (all + mod - bad) % mod;
  cout << ans << endl;
}
