#include <bits/stdc++.h>
using namespace std;
const int base = 1e9 + 7;
const int N = 3000;
int n, m, dp[N][N], dp2[N][N];
string s;
int main() {
  cin >> n >> m;
  cin >> s;
  int cnt = 0, lim = base;
  for (char x : s) {
    if (x == '(')
      cnt++;
    else
      cnt--;
    lim = min(lim, cnt);
  }
  dp[0][0] = 1;
  for (int i = 1; i <= 2000; i++)
    for (int j = 0; j <= 2000; j++) {
      dp[i][j] = (dp[i][j] + dp[i - 1][j + 1]) % base;
      if (j) dp[i][j] = (dp[i][j] + dp[i - 1][j - 1]) % base;
    }
  for (int i = 0; i <= 2000; i++)
    for (int j = 0; j <= 2000; j++)
      if (j + lim >= 0 && j + cnt <= 2000)
        dp2[i][j + cnt] = (dp2[i][j + cnt] + dp[i][j]) % base;
  for (int i = 1; i <= 2000; i++)
    for (int j = 0; j <= 2000; j++) {
      dp2[i][j] = (dp2[i][j] + dp2[i - 1][j + 1]) % base;
      if (j) dp2[i][j] = (dp2[i][j] + dp2[i - 1][j - 1]) % base;
    }
  cout << dp2[n - m][0];
}
