#include <bits/stdc++.h>
using namespace std;
const long long base = 1e9 + 7;
long long n, m, f[205][205][205], tr[205][500];
string s;
long long lui(long long i, long long j, long long k) {
  if (f[i][j][k] != -1) return f[i][j][k];
  if (i > n) {
    if (j == m && k == 0) return 1;
    return 0;
  }
  long long ans = 0, nj = j;
  if (nj != m) nj = tr[nj]['('];
  ans += lui(i + 1, nj, k + 1), ans %= base;
  nj = j;
  if (nj != m) nj = tr[nj][')'];
  if (k) ans += lui(i + 1, nj, k - 1), ans %= base;
  return f[i][j][k] = ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  cin >> s;
  n *= 2;
  m = s.length();
  for (long long j = (1); j <= (m - 1); ++j) {
    if (s[j] == '(')
      tr[j]['('] = j + 1;
    else {
      tr[j]['('] = 0;
      long long r = j;
      for (long long h = (1); h <= (j); ++h)
        if (s[h - 1] == '(') {
          long long l = h - 1;
          while (s[r - 1] == s[l - 1] && l > 0 && r > 0) l--, r--;
          if (l == 0) tr[j]['('] = h;
          r = j;
        }
    }
  }
  for (long long j = (1); j <= (m - 1); ++j) {
    if (s[j] == ')')
      tr[j][')'] = j + 1;
    else {
      tr[j][')'] = 0;
      long long r = j;
      for (long long h = (1); h <= (j); ++h)
        if (s[h - 1] == ')') {
          long long l = h - 1;
          while (s[r - 1] == s[l - 1] && l > 0 && r > 0) {
            l--;
            r--;
          }
          if (l == 0) tr[j][')'] = h;
          r = j;
        }
    }
  }
  tr[0][s[0]] = 1;
  memset(f, -1, sizeof(f));
  cout << lui(1, 0, 0);
  return 0;
}
