#include <bits/stdc++.h>
using namespace std;
template <typename T>
void out(T x) {
  cout << x << endl;
  exit(0);
}
const int maxn = 205;
const long long mod = 1000000007;
long long n;
string s;
long long dp[maxn][maxn][maxn][2];
long long len[maxn][2];
long long calc(string& prefix) {
  long long sz = prefix.length();
  for (long long i = 0; i < sz; i++) {
    if (prefix.substr(i) == s.substr(0, sz - i)) {
      return sz - i;
    }
  }
  return 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> s;
  if (s[0] == '(')
    len[0][0] = 1;
  else
    len[0][1] = 1;
  string prefix = "";
  for (long long i = 0; i < (long long)s.length(); i++) {
    prefix += s[i];
    prefix += '(';
    len[i + 1][0] = calc(prefix);
    prefix.pop_back();
    prefix += ')';
    len[i + 1][1] = calc(prefix);
    prefix.pop_back();
  }
  dp[0][0][0][0] = 1;
  for (long long i = 0; i <= 2 * n; i++) {
    for (long long j = 0; j <= n; j++) {
      for (long long k = 0; k <= (long long)s.length(); k++) {
        for (long long l = 0; l <= 1; l++) {
          if (dp[i][j][k][l] == 0) continue;
          if (j + 1 <= n) {
            dp[i + 1][j + 1][len[k][0]]
              [l | (len[k][0] == (long long)s.length())] += dp[i][j][k][l];
            dp[i + 1][j + 1][len[k][0]]
              [l | (len[k][0] == (long long)s.length())] %= mod;
          }
          if (j > 0) {
            dp[i + 1][j - 1][len[k][1]]
              [l | (len[k][1] == (long long)s.length())] += dp[i][j][k][l];
            dp[i + 1][j - 1][len[k][1]]
              [l | (len[k][1] == (long long)s.length())] %= mod;
          }
        }
      }
    }
  }
  long long ans = 0;
  for (long long k = 0; k <= (long long)s.length(); k++) {
    ans += dp[2 * n][0][k][1];
    ans %= mod;
  }
  cout << ans << endl;
  return 0;
}
