#include <bits/stdc++.h>
using namespace std;
long double PI = atan(1) * 4;
int n, m;
string str;
int left_b;
int right_b;
long long dp[2002][2][4002];
long long func(int pos, bool niso_ki, int le_t) {
  if (dp[pos][niso_ki][le_t] != -1) {
    return dp[pos][niso_ki][le_t];
  }
  long long ans = 0;
  if (niso_ki == 0) {
    if (le_t >= right_b) {
      ans = (ans + func(pos, 1, le_t - right_b + left_b)) % 1000000007;
    }
  }
  if (pos == (n - m)) {
    if (le_t == 0 && niso_ki) {
      return 1;
    }
    return ans;
  }
  ans = (ans + func(pos + 1, niso_ki, le_t + 1)) % 1000000007;
  if (le_t) {
    ans = (ans + func(pos + 1, niso_ki, le_t - 1)) % 1000000007;
  }
  return dp[pos][niso_ki][le_t] = ans;
}
int main() {
  cin >> n >> m;
  cin >> str;
  left_b = 0;
  right_b = 0;
  for (int i = 0; i <= m - 1; i++) {
    if (str[i] == '(') {
      left_b++;
    }
    if (str[i] == ')') {
      if (left_b) {
        left_b--;
      } else {
        right_b++;
      }
    }
  }
  if ((left_b > 2001) || (right_b > 2001)) {
    cout << 0 << "\n";
  } else {
    memset((dp), -1, sizeof(dp));
    cout << func(0, 0, 0) % 1000000007 << "\n";
  }
  return 0;
}
