#include <bits/stdc++.h>
inline void inp(long long int &n) {
  n = 0;
  int ch = getchar();
  int sign = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') sign = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9')
    n = (n << 3) + (n << 1) + ch - '0', ch = getchar();
  n = n * sign;
}
using namespace std;
long long int n, m;
const int MAXN = (long long int)5e3 + 10;
long long int dp[MAXN][MAXN];
long long int minB, b;
string s;
int main() {
  minB = INT_MAX;
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m;
  cin >> s;
  dp[0][0] = 1;
  for (long long int i = 1; i <= n - m; i += 1) {
    dp[i][0] = dp[i - 1][1];
    for (int j = 1; j <= i; j += 1) {
      dp[i][j] = dp[i - 1][j - 1] + dp[i - 1][j + 1];
      dp[i][j] %= 1000000007;
    }
  }
  long long int ans = 0;
  for (long long int i = 0; i < m; i++) {
    if (s[i] == '(')
      b++;
    else {
      b--;
    }
    minB = min(minB, b);
  }
  for (int c = 0; c <= n - m; c += 1) {
    for (int d = 0; d <= c; d += 1) {
      if (d >= -minB) {
        if (d + b <= n - m && d + b >= 0) {
          ans += (dp[c][d] * dp[n - m - c][d + b]) % 1000000007;
          ans %= 1000000007;
        }
      }
    }
  }
  cout << ans;
  return 0;
}
