#include <bits/stdc++.h>
using namespace std;
const int N = 203, MOD = 1e9 + 7;
int dp[N][N][N][2];
bool check(string &s, int l, int k, char p) {
  if (k == 0) return true;
  k--;
  int pos = l - k;
  for (int i = 0; i < k; ++i) {
    if (s[i] != s[pos++]) return false;
  }
  return s[k] == p;
}
void add(int &a, int b) { a = (a + b) % MOD; }
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  string s;
  cin >> n >> s;
  int sz = s.size();
  vector<char> par = {'(', ')'};
  vector<vector<int>> len(sz + 1, vector<int>(2, 0));
  for (int i = 0; i < len.size(); ++i) {
    for (int j = 0; j < 2; ++j) {
      for (int k = i + 1; k >= 0; k--) {
        if (k <= sz && check(s, i, k, par[j])) {
          len[i][j] = k;
          break;
        }
      }
    }
  }
  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 <= sz; ++k) {
        for (int l = 0; l < 2; ++l) {
          if (j < n)
            add(dp[i + 1][j + 1][len[k][0]][l || len[k][0] == sz],
                dp[i][j][k][l]);
          if (j > 0)
            add(dp[i + 1][j - 1][len[k][1]][l || len[k][1] == sz],
                dp[i][j][k][l]);
        }
      }
    }
  }
  int ans = 0;
  for (int i = 0; i <= sz; ++i) {
    add(ans, dp[2 * n][0][i][1]);
  }
  cout << ans << "\n";
  return 0;
}
