#include <bits/stdc++.h>
using namespace std;
const int maxN = 2005;
const int MOD = 1e9 + 7;
int N, M, dp[maxN][maxN][2], c, op, mx;
string str;
int solve(int rem, int diff, int after) {
  if (diff < 0 || (diff > rem && after)) return 0;
  if (rem == 0) {
    if (after) return diff == 0;
    return diff >= mx && diff + op - c == 0;
  }
  int &ret = dp[rem][diff][after];
  if (ret != -1) return ret;
  ret = 0;
  if (!after && diff >= mx) ret = (ret + solve(rem, diff + op - c, true)) % MOD;
  ret = (ret + solve(rem - 1, diff - 1, after)) % MOD;
  ret = (ret + solve(rem - 1, diff + 1, after)) % MOD;
  return ret;
}
int main() {
  cin >> N >> M >> str;
  for (int i = 0; i < M; i++) {
    if (str[i] == '(')
      op++;
    else
      c++;
    mx = max(mx, c - op);
  }
  memset(dp, -1, sizeof dp);
  printf("%d", solve(N - M, 0, false));
  return 0;
}
