#include <bits/stdc++.h>
using namespace std;
int N;
int M;
string s;
int mod = (int)1e9 + 7;
long long open[2003][2003];
void modadd(long long& a, long long b) { a = (a + b) % mod; }
long long modmult(long long a, long long b) { return (a * b) % mod; }
int main() {
  scanf("%d %d", &N, &M);
  open[0][0] = 1;
  for (int i = 0; i <= N - M; i++) {
    for (int curropen = 0; curropen <= i; curropen++) {
      modadd(open[i + 1][curropen + 1], open[i][curropen]);
      if (curropen - 1 >= 0) {
        modadd(open[i + 1][curropen - 1], open[i][curropen]);
      }
    }
  }
  int score = 0;
  int minpscore = 0;
  cin >> s;
  for (int i = 0; i < M; i++) {
    if (s[i] == '(') {
      score++;
    } else {
      score--;
    }
    minpscore = max(minpscore, -score);
  }
  long long ret = 0;
  for (int plen = minpscore; plen <= N - M; plen++) {
    for (int pscore = minpscore; pscore <= plen; pscore++) {
      if (pscore + score <= 2000) {
        modadd(ret,
               (open[plen][pscore] * open[N - M - plen][pscore + score]) % mod);
      }
    }
  }
  printf("%lld", ret);
}
