#include <bits/stdc++.h>
using namespace std;
long long int o = 0, c = 0, newLength, minAllowed;
long long int dp[2005][2005][2];
bool check(long long int open, long long int close) { return open >= close; }
long long int solve(long long int idx, long long int openBraces,
                    long long int ok) {
  long long int openNow = o * ok, closedNow = c * ok;
  openNow += openBraces;
  closedNow += (idx - openBraces);
  if (!check(openNow, closedNow)) return 0;
  if (idx == newLength) {
    if (ok == 0) {
      openNow += o, closedNow += c;
      return openNow == closedNow &&
             openBraces - (idx - openBraces) >= minAllowed;
    }
    return openNow == closedNow;
  }
  if (dp[idx][openBraces][ok] != -1LL) return dp[idx][openBraces][ok];
  long long int count = 0;
  if (check(openNow, closedNow + 1))
    count = solve(idx + 1, openBraces, ok) % 1000000007;
  if (check(openNow + 1, closedNow))
    count = (count + solve(idx + 1, openBraces + 1, ok)) % 1000000007;
  if (ok == 0) {
    if (check(openNow, closedNow) && openNow - closedNow >= minAllowed)
      count = (count + solve(idx, openBraces, 1)) % 1000000007;
  }
  return dp[idx][openBraces][ok] = count;
}
int main(void) {
  long long int desiredLength, length, i, flag = 1;
  string str;
  cin >> desiredLength >> length;
  newLength = desiredLength - length;
  cin >> str;
  memset(dp, -1LL, sizeof dp);
  for (i = 0; i < str.size(); i++) {
    if (str[i] == '(')
      o++;
    else
      c++;
    if (c > o) flag = 0;
    minAllowed = max(minAllowed, c - o);
  }
  if (newLength == 0) {
    if (flag == 1 && o == c)
      flag = 1;
    else
      flag = 0;
    cout << (flag) << endl;
    return 0;
  }
  cout << (solve(0, 0, 0)) % 1000000007;
  return 0;
}
