#include <bits/stdc++.h>
using namespace std;
char str[200010];
long long dp[2010][4010][2];
int MOD = 1e9 + 7;
int ABS(int x) {
  if (x < 0)
    return -x;
  else
    return x;
}
int main(int argc, char const *argv[]) {
  int n, m;
  scanf("%d%d", &n, &m);
  scanf("%s", str);
  int d = 0, M = n;
  for (int i = 0; i < m; i++) {
    if (str[i] == '(')
      d++;
    else
      d--;
    M = min(M, d);
  }
  if (ABS(d) > n - m) {
    printf("0\n");
    return 0;
  }
  memset(dp, 0, sizeof(dp));
  dp[0][0][0] = 1;
  for (int i = 0; i < n - m; i++) {
    for (int j = 0; j <= n - m; j++) {
      dp[i][j][0] %= MOD;
      dp[i][j][1] %= MOD;
    }
    for (int j = 0; j <= n - m; j++)
      if (dp[i][j][0] != 0) {
        dp[i + 1][j + 1][0] += dp[i][j][0];
        if (j > 0) dp[i + 1][j - 1][0] += dp[i][j][0];
        if (j + d + 1 >= 0 && j + M >= 0)
          dp[i + 1][j + d + 1][1] += dp[i][j][0];
        if (j + d - 1 >= 0 && j + M >= 0)
          dp[i + 1][j + d - 1][1] += dp[i][j][0];
      }
    for (int j = 0; j <= n - m; j++)
      if (dp[i][j][1] != 0) {
        dp[i + 1][j + 1][1] += dp[i][j][1];
        if (j > 0) dp[i + 1][j - 1][1] += dp[i][j][1];
      }
  }
  long long ans;
  if (M < d)
    ans = 0;
  else
    ans = dp[n - m][-d][0];
  printf("%I64d\n", (ans + dp[n - m][0][1]) % MOD);
  return 0;
}
