#include <bits/stdc++.h>
using namespace std;
void FastIO() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
}
long long int mod = 1e9 + 7;
long long int sum(long long int a, long long int b) {
  a += b;
  if (a >= mod) a -= mod;
  return a;
}
long long int mult(long long int a, long long int b) { return (a * b) % mod; }
int main() {
  FastIO();
  long long int n, m, o = 0, c = 0, temp, temp1, temp2, ans = 0, flag = 0,
                      m1 = 0, m2 = 0;
  cin >> n >> m;
  char ch;
  vector<vector<long long int> > cnt(2001, vector<long long int>(2001, 0));
  for (int i = 0; i < m; i++) {
    cin >> ch;
    if (ch == '(')
      o++;
    else
      c++;
    if (o < c) flag = 1;
    m1 = max(m1, c - o);
    m2 = min(m2, o - c);
  }
  m2 *= -1;
  if (n % 2 || (n == m && flag)) {
    cout << "0" << '\n';
    return 0;
  }
  for (int i = 0; i <= 2000; i++) {
    for (int j = 0; j <= 2000; j++) {
      if (i < j) {
        cnt[i][j] = 0;
      } else if (!i || !j) {
        cnt[i][j] = 1;
      } else {
        cnt[i][j] = sum(cnt[i][j], cnt[i - 1][j]);
        cnt[i][j] = sum(cnt[i][j], cnt[i][j - 1]);
      }
    }
  }
  int k = n - m;
  for (int i = 0; i <= k; i++) {
    int l = i;
    int r = k - i;
    for (int j = 0; j <= l; j++) {
      if (j < m1) continue;
      if (l - j + m1 > j) continue;
      temp1 = cnt[j][l - j];
      if (n / 2 - c - l + j < 0 || n / 2 - o - j < 0) continue;
      temp2 = cnt[n / 2 - c - l + j][n / 2 - o - j];
      temp = mult(temp1, temp2);
      ans = sum(ans, temp);
    }
  }
  cout << ans << '\n';
  return 0;
}
