#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
long long dp[2002][2002];
int main() {
  for (int i = 0; i < 2002; i++)
    for (int j = 0; j < 2002; j++) dp[i][j] = 0;
  int n, m;
  cin >> n >> m;
  dp[0][0] = 1;
  for (int i = 1; i <= n - m; i++) {
    dp[0][i] = dp[1][i - 1];
    for (int j = 1; j <= i; j++) {
      dp[j][i] += dp[j - 1][i - 1];
      dp[j][i] += dp[j + 1][i - 1];
      dp[j][i] = dp[j][i] % MOD;
    }
  }
  int vmin = INT_MAX;
  int v = 0;
  char in;
  for (int i = 0; i < m; i++) {
    cin >> in;
    if (in == '(')
      v++;
    else
      v--;
    vmin = min(vmin, v);
  }
  long long ret = 0;
  int b = max(-vmin, 0);
  for (int l = 0; l <= n - m; l++) {
    for (int i = b; i <= l; i++) {
      if (i + v <= n - m) {
        ret += (dp[i][l] * dp[i + v][n - m - l]);
        ret %= MOD;
      }
    }
  }
  cout << ret;
  return 0;
}
