#include <bits/stdc++.h>
using namespace std;
const int N = 2e3 + 10, MOD = 1e9 + 7;
string s;
int dp[N][N];
int n, m, mn, res, ans;
inline int sum(int a, int b) {
  a += b;
  if (a >= MOD) a -= MOD;
  return a;
}
inline int mul(int a, int b) { return (1LL * a * b) % MOD; }
int main() {
  cin >> n >> m >> s;
  for (int i = 0; i < m; i++) {
    (s[i] == '(' ? res++ : res--);
    mn = min(mn, res);
  }
  dp[0][0] = 1;
  for (int i = 1; i <= n - m; i++) {
    dp[i][0] = dp[i - 1][1];
    for (int j = 1; j <= i; j++)
      dp[i][j] = sum(dp[i - 1][j - 1], dp[i - 1][j + 1]);
  }
  for (int i = 0; i <= n - m; i++)
    for (int j = 0; j <= i; j++)
      if (j + mn >= 0 && j + res <= n - m)
        ans = sum(ans, mul(dp[i][j], dp[n - m - i][j + res]));
  return cout << ans, 0;
}
