#include <bits/stdc++.h>
using namespace std;
const long mod = (long)1e9 + 7;
long n, m;
string s;
long lmin = 1000000;
long ssum = 0;
long long dp[2010][2010][2];
long long rec(long now, long o, int used) {
  if (dp[now][o][used] >= 0) return dp[now][o][used];
  long long ret = 0;
  if (now == n - m + 1) {
    ret = (o == 0);
  } else if (now == n - m && used == 0) {
    if (o >= -lmin) {
      ret += rec(now + 1, o + ssum, 1);
      ret %= mod;
    } else
      ret = 0;
  } else {
    if (o < 2005) {
      ret += rec(now + 1, o + 1, used);
      ret %= mod;
    }
    if (o > 0) {
      ret += rec(now + 1, o - 1, used);
      ret %= mod;
    }
    if (used == 0 && o >= -lmin) {
      ret += rec(now + 1, o + ssum, 1);
      ret %= mod;
    }
  }
  ret %= mod;
  return dp[now][o][used] = ret;
}
int main(int argc, char const *argv[]) {
  long i;
  cin >> n >> m;
  cin >> s;
  bool valid = true;
  for (i = 0; i < m; ++i) {
    if (s[i] == '(')
      ++ssum;
    else
      --ssum;
    lmin = min(lmin, ssum);
  }
  if (ssum > n - m || ssum < -(n - m)) valid = false;
  if (valid) {
    memset(dp, -1, sizeof(dp));
    std::cout << rec(0, 0, 0) << std::endl;
  } else
    printf("0\n");
  return 0;
}
