#include <bits/stdc++.h>
using namespace std;
const int sz = 202, mod = 1e9 + 7;
string s;
int dp[sz][sz][sz][2], w[sz];
int fnc(int x, int y = 0, int tot = 0, bool done = 0) {
  if (tot < 0) return 0;
  if (!x) {
    if (!tot && done) return 1;
    return 0;
  }
  if (dp[x][y][tot][done] < 0) {
    long long now = 0;
    bool nxt = done | (y + 1 == s.size());
    if (s[y] == '(') {
      now += fnc(x - 1, y + 1, tot + 1, nxt);
      now += fnc(x - 1, w[y], tot - 1, done);
    } else {
      now += fnc(x - 1, y + 1, tot - 1, nxt);
      now += fnc(x - 1, w[y], tot + 1, done);
    }
    now > mod ? now -= mod : now;
    dp[x][y][tot][done] = now;
  }
  return dp[x][y][tot][done];
}
void flop(int x) {
  if (s[x] == ')')
    s[x] = '(';
  else
    s[x] = ')';
}
void process() {
  for (int i = 0; i + 1 < s.size(); i++) {
    flop(i + 1);
    for (int j = 0; j <= i; j++) {
      if (s.substr(0, j + 1) == s.substr(i + 1 - j, j + 1)) w[i + 1] = j + 1;
    }
    flop(i + 1);
  }
}
int main() {
  int n;
  cin >> n >> s;
  process();
  memset(dp, -1, sizeof(dp));
  cout << fnc(n << 1);
}
