#include <bits/stdc++.h>
using namespace std;
int sk[100009];
int pref = 0;
int suff = 0;
int dp[2009][2009];
const int mod = (int)1e9 + 7;
int main() {
  dp[0][0] = 1;
  for (int i = 1; i <= 2000; ++i) {
    for (int j = 0; j <= 2000; ++j) {
      if (j) dp[i][j] += dp[i - 1][j - 1];
      if (dp[i][j] >= mod) dp[i][j] -= mod;
      dp[i][j] += dp[i - 1][j + 1];
      if (dp[i][j] >= mod) dp[i][j] -= mod;
    }
  }
  int n, m;
  scanf("%d%d", &n, &m);
  scanf("\n");
  int cnt = 0;
  for (int i = 0; i < m; ++i) {
    char c;
    scanf("%c", &c);
    sk[i] = c == '(';
  }
  cnt = 0;
  for (int i = 0; i < m; ++i) {
    if (!sk[i]) {
      cnt++;
    } else
      cnt--;
    if (pref < cnt) pref = cnt;
  }
  cnt = 0;
  for (int i = m - 1; i >= 0; --i) {
    if (sk[i]) {
      cnt++;
    } else
      cnt--;
    if (suff < cnt) suff = cnt;
  }
  int ans = 0;
  int need = n - m;
  for (int i = 0; i <= need; ++i) {
    int j = need - i;
    for (int t = 0; t + pref <= 2000 && suff + t <= 2000; ++t) {
      ans += dp[i][pref + t] * 1LL * dp[j][suff + t] % mod;
      if (ans >= mod) ans -= mod;
    }
  }
  cout << ans;
  return 0;
}
