#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long b[2005][4005];
long long f[2005][4005];
long long n, m, sum, mn, ans;
void add(long long &a, long long b) {
  a += b;
  if (a > mod) a %= mod;
}
void pre_calc() {
  b[0][2000] = 1;
  for (long long i = 1; i <= 2000; i++)
    for (long long j = 0; j <= 2000; j++) {
      if (j - 1 >= 0) add(b[i][j], b[i - 1][j - 1]);
      if (j + 1 <= 2000) add(b[i][j], b[i - 1][j + 1]);
    }
  f[0][2000] = 1;
  for (long long i = 1; i <= 2000; i++)
    for (long long j = 2000; j <= 4000; j++) {
      if (j - 1 >= 2000) add(f[i][j], f[i - 1][j - 1]);
      if (j + 1 <= 4000) add(f[i][j], f[i - 1][j + 1]);
    }
}
signed main() {
  cin >> n >> m;
  for (long long i = 1; i <= m; i++) {
    char c;
    cin >> c;
    if (c == '(')
      sum++;
    else
      sum--;
    mn = min(mn, sum);
  }
  pre_calc();
  for (long long i = 0; i <= n - m; i++)
    for (long long k = 2000 - mn; k <= 4000; k++) {
      long long j = n - m - i;
      long long kk = 4000 - (sum + k);
      if (kk < 0 || kk > 4000) continue;
      add(ans, f[i][k] * b[j][kk]);
    }
  cout << ans;
  return 0;
}
