#include <bits/stdc++.h>
using namespace std;
const int inf = (int)1e9;
const int mod = (int)1e9 + 7;
void str_in(string &s) {
  s = "";
  char c = getchar();
  while (c != '(' && c != ')') {
    c = getchar();
  }
  while (c == '(' || c == ')') {
    s += c;
    c = getchar();
  }
  return;
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  string s;
  str_in(s);
  vector<vector<int> > d(2010, vector<int>(2010, 0));
  d[0][0] = 1;
  for (int len = 0; len <= 2000; ++len) {
    d[len + 1][1] += d[len][0];
    d[len + 1][1] %= mod;
    for (int b = 1; b <= 2000; ++b) {
      d[len + 1][b + 1] += d[len][b];
      d[len + 1][b + 1] %= mod;
      d[len + 1][b - 1] += d[len][b];
      d[len + 1][b - 1] %= mod;
    }
  }
  int worst = 0;
  int cur_b = 0;
  for (char &c : s) {
    if (c == '(') {
      ++cur_b;
    } else {
      --cur_b;
      worst = max(worst, -cur_b);
    }
  }
  if (worst + cur_b > 2000) {
    return printf("0"), 0;
  }
  int ans = 0;
  for (int len = 0; len <= n - m; ++len) {
    for (int b = worst; b <= 2000; ++b) {
      ans += (1ll * d[len][b] * d[n - m - len][b + cur_b]) % mod;
      ans %= mod;
    }
  }
  printf("%d", ans);
  return 0;
}
