#include <bits/stdc++.h>
using namespace std;
int lk[256][2];
int N, M;
string s;
bool check(int x, int y) {
  for (int i = x, j = y; i >= 0; i--, j--)
    if (s[i] != s[j]) return false;
  return true;
}
int dp[256][256][256];
bool vis[256][256][256];
int solve(int pos, int match, int open) {
  if (open < 0) return 0;
  if (pos == N) {
    if (open == 0)
      return 1;
    else
      return 0;
  }
  if (vis[pos][match][open]) return dp[pos][match][open];
  vis[pos][match][open] = true;
  if (lk[match][0] != M)
    dp[pos][match][open] += solve(pos + 1, lk[match][0], open + 1);
  dp[pos][match][open] %= 1000000007;
  if (lk[match][1] != M)
    dp[pos][match][open] += solve(pos + 1, lk[match][1], open - 1);
  dp[pos][match][open] %= 1000000007;
  return dp[pos][match][open];
}
long long fact[256], ifact[256];
int main() {
  fact[0] = fact[1] = 1;
  for (int i = 2; i < 256; i++) fact[i] = fact[i - 1] * i % 1000000007;
  ifact[0] = ifact[1] = 1;
  for (int i = 2; i < 256; i++)
    ifact[i] =
        (1000000007 - (1000000007 / i) * ifact[1000000007 % i] % 1000000007) %
        1000000007;
  for (int i = 2; i < 256; i++) ifact[i] = ifact[i] * ifact[i - 1] % 1000000007;
  cin >> N >> s;
  long long total =
      (fact[2 * N] * ifact[N] % 1000000007) * ifact[N + 1] % 1000000007;
  N *= 2;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '(')
      lk[i][0] = i + 1;
    else {
      for (int j = i - 1; j >= 0; j--)
        if (s[j] == '(' && check(j - 1, i - 1)) {
          lk[i][0] = j + 1;
          break;
        }
    }
    if (s[i] == ')')
      lk[i][1] = i + 1;
    else {
      for (int j = i - 1; j >= 0; j--)
        if (s[j] == ')' && check(j - 1, i - 1)) {
          lk[i][1] = j + 1;
          break;
        }
    }
  }
  M = s.size();
  cout << (1000000007 + total - solve(0, 0, 0)) % 1000000007 << endl;
}
