#include <bits/stdc++.h>
using namespace std;
int n, m, dp[2005][2005][2];
string s;
int fun(int k, int x, int y, int i, int a, int p) {
  if ((p * x) + a - (i - a) < 0) return 0;
  if (i == k) {
    if (p) return ((x + (2 * a) - i) == 0);
    if ((x + (2 * a) - i) == 0 && (2 * a) - i + y >= 0) return 1;
    return 0;
  }
  if (dp[i][a][p] != -1) return dp[i][a][p];
  int ans = 0;
  if (p == 0) {
    if ((y + (2 * a) - i) >= 0) ans = fun(k, x, y, i, a, 1);
    ans = ((ans % 1000000007) + (fun(k, x, y, i + 1, a + 1, 0) % 1000000007)) %
          1000000007;
    ans = ((ans % 1000000007) + (fun(k, x, y, i + 1, a, 0) % 1000000007)) %
          1000000007;
  } else {
    ans = ((ans % 1000000007) + (fun(k, x, y, i + 1, a + 1, 1) % 1000000007)) %
          1000000007;
    ans = ((ans % 1000000007) + (fun(k, x, y, i + 1, a, 1) % 1000000007)) %
          1000000007;
  }
  return dp[i][a][p] = ans % 1000000007;
}
int main() {
  scanf("%d%d", &n, &m);
  cin >> s;
  int x = 0, y = 0;
  for (int i = 0; i < m; i++) {
    x = x + (s[i] == '(') - (s[i] == ')');
    y = min(y, x);
  }
  if (n % 2)
    printf("0\n");
  else {
    for (int i = 0; i < 2005; i++) {
      for (int j = 0; j < 2005; j++) {
        for (int p = 0; p < 2; p++) {
          dp[i][j][p] = -1;
        }
      }
    }
    long long int ans = fun(n - m, x, y, 0, 0, 0) % 1000000007;
    printf("%lld ", ans % 1000000007);
    printf("\n");
  }
}
