#include <bits/stdc++.h>
#pragma GCC target("pclmul")
using ul = std::uint32_t;
using ull = std::uint64_t;
using li = std::int32_t;
using ll = std::int64_t;
using uss = std::uint8_t;
const ul mod = 1e9 + 7;
ul plus(ul a, ul b) { return a + b < mod ? a + b : a + b - mod; }
ul minus(ul a, ul b) { return a < b ? a + mod - b : a - b; }
ul mul(ul a, ul b) { return ull(a) * ull(b) % mod; }
const ul maxn = 100;
const ul maxlen = 200;
char str[maxlen + 2];
ul n;
ul fail[maxlen + 1];
ul to[maxlen + 1][2];
ul ans[maxn + 1][maxn + 1][maxlen + 1];
int main() {
  std::scanf("%u", &n);
  std::scanf("%s", str + 1);
  ul len = std::strlen(str + 1);
  fail[1] = 0;
  for (ul c = 0; c <= 1; ++c) {
    if (str[1] == '(' + c) {
      to[0][c] = 1;
    } else {
      to[0][c] = 0;
    }
  }
  for (ul i = 1; i + 1 <= len; ++i) {
    ul curr = i;
    ul next = i + 1;
    for (ul c = 0; c <= 1; ++c) {
      if (str[next] == '(' + c) {
        to[curr][c] = next;
        fail[next] = to[fail[curr]][c];
      } else {
        to[curr][c] = to[fail[curr]][c];
      }
    }
  }
  to[len][0] = len;
  to[len][1] = len;
  ans[0][0][0] = 1;
  for (ul a = 0; a <= n; ++a) {
    for (ul b = 0; b <= a; ++b) {
      for (ul t = 0; t <= len; ++t) {
        if (!ans[a][b][t]) {
          continue;
        }
        if (a != n) {
          ans[a + 1][b][to[t][0]] = plus(ans[a + 1][b][to[t][0]], ans[a][b][t]);
        }
        if (b != a) {
          ans[a][b + 1][to[t][1]] = plus(ans[a][b + 1][to[t][1]], ans[a][b][t]);
        }
      }
    }
  }
  std::printf("%u\n", ans[n][n][len]);
  return 0;
}
