#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
template <class T>
T Gcd(T x, T y) {
  return y ? Gcd(y, x % y) : x;
}
template <class T>
T Lcm(T x, T y) {
  return x / Gcd(x, y) * y;
}
const long long MOD = 1000000007LL;
const int M = 5000005;
const int N = 205;
int n, l, a[N], to[N], b[N], c[N];
char s[N];
long long f[N][N][N][2];
long long dp(int x, int y, int z, int w) {
  if (y < 0) return 0LL;
  if (x >= n) {
    return (w && !y) ? 1LL : 0LL;
  }
  if (f[x][y][z][w] >= 0) return f[x][y][z][w];
  int t = z;
  while (t >= 0 && a[t] != 1) t = to[t];
  t++;
  long long res = dp(x + 1, y + 1, t, w | (t >= l ? 1 : 0));
  t = z;
  while (t >= 0 && a[t] != 0) t = to[t];
  t++;
  res += dp(x + 1, y - 1, t, w | (t >= l ? 1 : 0));
  f[x][y][z][w] = res % MOD;
  return f[x][y][z][w];
}
int main() {
  scanf("%d", &n);
  n <<= 1;
  while (scanf("%s", (s)), !strlen((s)))
    ;
  l = strlen(s);
  for (int i = 0; i < l; i++)
    if (s[i] == '(') a[i] = 1;
  to[0] = -1;
  int i = 0, j = -1;
  while (i < l)
    if (j < 0 || s[i] == s[j])
      to[++i] = ++j;
    else
      j = to[j];
  memset((f), (-1), sizeof((f)));
  printf("%lld\n", dp(0, 0, 0, 0) % MOD);
  return 0;
}
