#include <bits/stdc++.h>
using namespace std;
long long M = 1e9 + 7;
long long DP[202][402][402];
string s;
int n;
long long POS[402];
long long solve(int pf, int pos, int deg) {
  if (DP[pf][pos][deg] != -1) return DP[pf][pos][deg];
  if (deg < 0) return 0;
  if (pos >= 2 * n) return (pf >= s.size() && deg == 0 ? 1 : 0);
  if (pf >= s.size()) {
    return DP[pf][pos][deg] =
               (solve(pf, pos + 1, deg + 1) + solve(pf, pos + 1, deg - 1)) % M;
  } else {
    long long ats = 0;
    if (s[pf] == '(') {
      ats = (ats + solve(pf + 1, pos + 1, deg + 1) +
             solve(POS[pf], pos + 1, deg - 1)) %
            M;
    } else {
      ats = (ats + solve(POS[pf], pos + 1, deg + 1) +
             solve(pf + 1, pos + 1, deg - 1)) %
            M;
    }
    return DP[pf][pos][deg] = ats;
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> s;
  for (int i = 0; i < 202; i++)
    for (int j = 0; j < 402; j++)
      for (int k = 0; k < 402; k++) DP[i][j][k] = -1;
  for (int i = 1; i < s.size(); i++) {
    for (int j = 0; j <= i; j++) {
      string z = s.substr(j, i - j) + (s[i] == '(' ? ")" : "(");
      if (s.find(z) == 0) {
        POS[i] = z.size();
        break;
      }
    }
  }
  cout << solve(0, 0, 0);
}
