#include <bits/stdc++.h>
using namespace std;
const int N = 202;
const int mmod = 1e9 + 7;
int n;
int suf[N][2], dp[N][N][N][2];
string str;
int suf_len(string pat) {
  int len = pat.size();
  for (int i = len; i > 0; --i) {
    if (str.substr(0, i) == pat.substr(len - i, i)) return i;
  }
  return 0;
}
void add(int &a, int b) {
  a += b;
  if (a >= mmod) a -= mmod;
  if (a < 0) a += mmod;
}
int main() {
  cin >> n >> str;
  int len = str.size();
  if (str[0] == '(')
    suf[0][0] = 1;
  else
    suf[0][1] = 1;
  string pref;
  for (int i = 0; i < len; ++i) {
    pref += str[i];
    pref += '(';
    suf[i + 1][0] = suf_len(pref);
    pref.pop_back();
    pref += ')';
    suf[i + 1][1] = suf_len(pref);
    pref.pop_back();
  }
  dp[0][0][0][0] = 1;
  for (int i = 0; i < 2 * n; ++i) {
    for (int j = 0; j <= n; ++j) {
      for (int k = 0; k <= len; ++k) {
        for (int f = 0; f < 2; ++f) {
          if (dp[i][j][k][f] == 0) continue;
          if (j + 1 <= n)
            add(dp[i + 1][j + 1][suf[k][0]][f | (suf[k][0] == len)],
                dp[i][j][k][f]);
          if (j > 0)
            add(dp[i + 1][j - 1][suf[k][1]][f | (suf[k][1] == len)],
                dp[i][j][k][f]);
        }
      }
    }
  }
  int ans = 0;
  for (int i = 0; i <= len; ++i) add(ans, dp[2 * n][0][i][1]);
  printf("%d\n", ans);
  return 0;
}
