#include <bits/stdc++.h>
using namespace std;
const int maxn = 2000 + 85 - 69;
const long long int Mod = 1000LL * 1000 * 1000 + 7;
long long int dp[maxn][maxn];
int n, m;
string s;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m >> s;
  if (n & 1) {
    cout << 0 << endl;
    return 0;
  }
  int len = n - m;
  int sop = 0, scl = 0, maxdif = 0;
  int sopp = 0, sclp = 0, maxdifp = 0;
  for (int i = 0; i < ((int)(s).size()); i++) {
    if (s[i] == '(')
      sop++;
    else
      scl++;
    ((maxdif) = max((maxdif), (scl - sop)));
  }
  for (int i = ((int)(s).size()) - 1; i >= 0; i--) {
    if (s[i] == ')')
      sopp++;
    else
      sclp++;
    ((maxdifp) = max((maxdifp), (sclp - sopp)));
  }
  dp[0][0] = 1;
  for (int i = 1; i <= len; i++)
    for (int j = 0; j <= len; j++) {
      if (j - (i - 1 - j) >= 1) dp[i][j] = dp[i - 1][j];
      if (j) {
        dp[i][j] += dp[i - 1][j - 1];
        if (dp[i][j] >= Mod) dp[i][j] -= Mod;
      }
    }
  long long int ans = 0;
  for (int i = 0; i <= len; i++) {
    for (int j = (maxdif + i + 1) / 2; j <= i; j++) {
      int ii = len - i;
      int jj = n / 2 - (j + sop);
      int jjp = ii - jj;
      if (jj >= 0 and jjp >= 0 and jjp >= (maxdifp + ii + 1) / 2) {
        ans += dp[i][j] * dp[ii][jjp];
        ans %= Mod;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
