#include <bits/stdc++.h>
using namespace std;
static long long dp[2010][2010][2];
long long l, strl;
string str;
long long openstr, clstr;
long long diff[2][2];
const long long mod = 1000000007;
long long xfind(long long pos, long long open, long long b) {
  if (dp[pos][open][b] == -1) {
    long long ways = 0;
    if (b and pos == l - strl) {
      if (open + openstr == pos - open + clstr) {
        ways = 1;
      } else {
        ways = 0;
      }
    } else if (b and open + openstr >= pos - open + clstr) {
      ways += xfind(pos + 1, open + 1, b);
      if (open + openstr > pos - open + clstr) {
        ways += xfind(pos + 1, open, b);
      }
    } else if (!b and open >= pos - open) {
      if (!b and open + diff[0][0] >= pos - open + diff[0][1] and
          open + diff[1][0] >= pos - open + diff[1][1] and
          open + openstr >= pos - open + clstr) {
        ways += xfind(pos, open, true);
      }
      ways += xfind(pos + 1, open + 1, b);
      if (open > pos - open) {
        ways += xfind(pos + 1, open, b);
      }
    }
    dp[pos][open][b] = ways % mod;
  }
  return dp[pos][open][b];
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> l >> strl;
  cin >> str;
  openstr = clstr = 0;
  diff[0][0] = diff[0][1] = diff[1][0] = diff[1][1] = 0;
  for (int i = 0; i < strl; i++) {
    if (str[i] == '(') {
      openstr++;
    } else {
      clstr++;
    }
    if (openstr - clstr > diff[0][0] - diff[0][1]) {
      diff[0][0] = openstr;
      diff[0][1] = clstr;
    }
    if (openstr - clstr < diff[1][0] - diff[1][1]) {
      diff[1][0] = openstr;
      diff[1][1] = clstr;
    }
  }
  for (int i = 0; i <= l - strl + 5; i++) {
    for (int j = 0; j <= l - strl + 5; j++) {
      dp[i][j][0] = dp[i][j][1] = -1;
    }
  }
  cout << xfind(0, 0, 0) << endl;
  return 0;
}
