#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
int n, m;
int totl, totr;
char c;
long long dp[2005][2005];
long long ans;
int main() {
  scanf("%d%d", &n, &m);
  scanf("%c", &c);
  for (int i = 1; i <= m; i++) {
    scanf("%c", &c);
    if (c == '(')
      totl++;
    else if (!totl)
      totr++;
    else
      totl--;
  }
  dp[0][0] = 1;
  for (int i = 1; i <= 2001; i++) {
    dp[i][0] = dp[i - 1][1];
    for (int j = 1; j <= i; j++)
      dp[i][j] = (dp[i - 1][j - 1] + dp[i - 1][j + 1]) % mod;
  }
  for (int i = 0; i <= n - m; i++) {
    for (int j = totr; j <= i; j++) {
      if (j - totr + totl <= n - m - i)
        ans = (ans + dp[i][j] * dp[n - m - i][j - totr + totl]) % mod;
    }
  }
  printf("%lld", ans);
}
