#include <bits/stdc++.h>
using namespace std;
long long dp[2][5200][2], mod = 1000000007;
int main() {
  long long n, m, i, j, k, a, b, c, cnt = 0, fr, sc, mn = 999999999999;
  string str;
  scanf("%lld %lld", &n, &m);
  cin >> str;
  for (i = 0; i < m; i++) {
    if (str[i] == '(')
      cnt++;
    else {
      cnt--;
    }
    if (cnt < mn) mn = cnt;
  }
  k = n - m;
  long long idx, cap, sta;
  for (idx = k; idx >= 0; idx--) {
    fr = idx & 1;
    sc = (idx + 1) & 1;
    for (cap = 5009; cap >= 0; cap--) {
      for (sta = 1; sta >= 0; sta--) {
        if (idx == k) {
          long long p = 0, q = 0, r = 0, d = 0, e, f, s;
          if (sta == 0) {
            if (cap + mn >= 0 && cap + cnt == 0) p = 1;
          } else {
            if (cap == 0) q = 1;
          }
          s = (p + q) % mod;
          dp[fr][cap][sta] = s;
        } else {
          long long p = 0, q = 0, r = 0, d = 0, e, f, s;
          if (sta == 0) {
            if (cap + mn >= 0 && cap + cnt + 1 >= 0 && cap + cnt + 1 <= 5003) {
              p = dp[sc][cap + cnt + 1][1];
            }
            if (cap + mn >= 0 && cap + cnt - 1 >= 0 && cap + cnt - 1 <= 5003) {
              d = dp[sc][cap + cnt - 1][1];
            }
          }
          if (cap + 1 >= 0 && cap + 1 <= 5003) q = dp[sc][cap + 1][sta];
          if (cap - 1 >= 0 && cap - 1 <= 5003) r = dp[sc][cap - 1][sta];
          s = (p + q) % mod;
          s = (s + r) % mod;
          s = (s + d) % mod;
          dp[fr][cap][sta] = s;
        }
      }
    }
  }
  printf("%lld\n", dp[0][0][0]);
  return 0;
}
