#include <bits/stdc++.h>
using namespace std;
int N;
string S;
int M;
unsigned long long MOD = 1000000007;
int statechange[201][2];
unsigned long long dp[201][101][201];
unsigned long long catalan[101];
int findcatalan(int x) {
  catalan[0] = 1;
  for (int i = 1; i <= (int)x; i++) {
    catalan[i] = 0;
    for (int j = 0; j < (int)(i); j++) {
      unsigned long long partial =
          (1LL * catalan[j] * catalan[i - j - 1]) % MOD;
      catalan[i] += partial;
      catalan[i] %= MOD;
    }
  }
  return catalan[x];
}
int getnextstate(int len, char x) {
  string newstring = S.substr(0, len);
  newstring += x;
  for (int l = newstring.size(); l >= 1; l--) {
    if (newstring.substr(newstring.size() - l, l) == S.substr(0, l)) {
      return l;
    }
  }
  return 0;
}
void calcstatechange() {
  for (int i = 0; i < (int)(M); i++) {
    statechange[i][0] = getnextstate(i, '(');
    statechange[i][1] = getnextstate(i, ')');
  }
}
int main() {
  cin >> N;
  cin >> S;
  M = S.length();
  unsigned long long total = findcatalan(N);
  calcstatechange();
  for (int i = 0; i <= (int)M - 1; i++) {
    for (int j = 0; j <= (int)N; j++) {
      for (int k = 0; k <= (int)2 * N; k++) {
        dp[i][j][k] = 0;
      }
    }
  }
  dp[0][0][0] = 1;
  for (int k = 0; k <= (int)2 * N - 1; k++) {
    for (int i = 0; i <= (int)M - 1; i++) {
      for (int j = 0; j <= (int)N; j++) {
        if (dp[i][j][k] == 0) continue;
        if (j + 1 <= N) {
          dp[statechange[i][0]][j + 1][k + 1] += dp[i][j][k];
          dp[statechange[i][0]][j + 1][k + 1] %= MOD;
        }
        if (j - 1 >= 0) {
          dp[statechange[i][1]][j - 1][k + 1] += dp[i][j][k];
          dp[statechange[i][1]][j - 1][k + 1] %= MOD;
        }
      }
    }
  }
  unsigned long long ans = 0;
  for (int i = 0; i <= (int)M - 1; i++) {
    ans += dp[i][0][2 * N];
    ans %= MOD;
  }
  cout << (total - ans + MOD) % MOD << "\n";
  return 0;
}
