#include <bits/stdc++.h>
using namespace std;
long long n, m, len, p[210], dp[210][210][210][2], ans;
char str[210];
long long dfs(long long now, long long pos, long long ds, bool ok) {
  if (ds < 0 || ds > n) return 0;
  if (!now) return !ds && ok;
  if (dp[now][pos][ds][ok] != -1) return dp[now][pos][ds][ok];
  long long res = 0, t;
  for (t = pos; t >= 0 && str[t + 1] != ')'; t = p[t])
    ;
  t++;
  res += dfs(now - 1, t, ds - 1, ok | (t == len));
  for (t = pos; t >= 0 && str[t + 1] != '('; t = p[t])
    ;
  t++;
  res += dfs(now - 1, t, ds + 1, ok | (t == len));
  return dp[now][pos][ds][ok] = res % 1000000007;
}
int main() {
  memset(dp, -1, sizeof(dp));
  int i, j, t, tmp;
  cin >> n;
  scanf("%s", str + 1);
  t = strlen(str + 1);
  len = t;
  p[0] = -1;
  for (i = 1, j = -1; i <= t; i++) {
    for (; j >= 0 && str[j + 1] != str[i]; j = p[j])
      ;
    p[i] = ++j;
  }
  cout << dfs(n * 2, 0, 0, 0);
}
