#include <bits/stdc++.h>
using namespace std;
const int N = 2005;
int mod = 1000000007;
int dp[N][N];
string s;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m, i, j, c = 0, o = 0;
  cin >> n >> m >> s;
  for (auto it : s) {
    if (it == '(')
      o++;
    else
      o--;
    if (o < 0) c = max(c, -o);
  }
  dp[0][0] = 1;
  for (i = 1; i <= n - m; i++) {
    for (j = 0; j <= i; j++) {
      dp[i][j] = dp[i - 1][j + 1];
      if (i > 0) dp[i][j] += dp[i - 1][j - 1];
      dp[i][j] %= mod;
    }
  }
  long long ans = 0;
  for (i = 0; i <= n - m; i++) {
    for (j = c; j <= i; j++) {
      if (j + o <= 2000) ans += (1LL * dp[i][j] * dp[n - m - i][j + o]) % mod;
      ans %= mod;
    }
  }
  printf("%lld", ans);
}
