#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3fffffff, maxn = 1e5 + 5, maxm = 2005, mod = 1e9 + 7;
char a[maxn];
long long dp[maxm][maxm];
int n, m;
int main(void) {
  int n, m, cnt = 0;
  scanf("%d%d", &n, &m);
  scanf("%s", a);
  int lcnt = INF;
  for (int i = 0; i < m; i++) {
    if (a[i] == '(')
      cnt++;
    else
      cnt--;
    lcnt = min(lcnt, cnt);
  }
  long long res = 0;
  dp[0][0] = 1ll;
  for (int i = 1; i <= n - m; i++) {
    for (int j = 0; j <= i; j++) {
      if (j == 0) {
        dp[i][j] = dp[i - 1][j + 1];
        continue;
      }
      dp[i][j] = (dp[i - 1][j - 1] + dp[i - 1][j + 1]) % mod;
    }
  }
  for (int i = 0; i <= n - m; i++) {
    for (int j = 0; j <= i; j++) {
      if (j + lcnt >= 0 && j + cnt <= n - m) {
        res += dp[i][j] * dp[n - m - i][j + cnt];
        res %= mod;
      }
    }
  }
  printf("%I64d\n", res);
  return 0;
}
