#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
char c[1 << 20];
int dp[2005][2005];
int main(void) {
  int n, m;
  cin >> n >> m;
  cin >> (c + 1);
  int cnt = 0;
  int mx = 0;
  for (int i = 1; i <= m; ++i) {
    if (c[i] == '(')
      ++cnt;
    else {
      if (cnt)
        --cnt;
      else
        ++mx;
    }
  }
  dp[0][0] = 1;
  for (int i = 1; i <= 2000; ++i)
    for (int j = 0; j <= 2000; ++j)
      if (j)
        dp[i][j] = (dp[i - 1][j - 1] + dp[i - 1][j + 1]) % mod;
      else
        dp[i][j] = dp[i - 1][j + 1];
  int ans = 0;
  cnt = max(cnt, 0);
  for (int i = 0; i <= n - m; ++i)
    for (int j = mx; j <= n - m - cnt; ++j)
      ans = (ans + 1ll * dp[i][j] * dp[n - m - i][cnt + j - mx]) % mod;
  return cout << ans << '\n', 0;
}
