#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
double PI = 4 * atan(1);
long long n, m, len, wid, ind, arr[2000][2000], ans;
string second;
void prep() {
  cin >> n >> m >> second;
  long long ind1 = 0;
  for (int i = 0; i < second.length(); i++) {
    if (second[i] == '(') {
      len++;
      ind1--;
    } else {
      wid++;
      ind1++;
    }
    ind = max(ind, ind1);
  }
  for (int i = 0; i < 2000; i++)
    for (int j = 0; j < 2000; j++) {
      if (i == 0 && j == 0)
        arr[i][j] = 1;
      else if (i >= j) {
        if (i > 0 && (i - 1) >= j) arr[i][j] += arr[i - 1][j];
        if (j > 0) arr[i][j] += arr[i][j - 1];
        arr[i][j] %= MOD;
      }
    }
}
int main() {
  prep();
  if (n % 2 == 1) {
    cout << 0;
    return 0;
  }
  for (int i = 0; i < 2000; i++)
    for (int j = 0; j < 2000; j++) {
      if (i - j - ind >= 0 && (i + len) <= n / 2 && (j + wid) <= n / 2) {
        ans += (arr[i][j] * arr[n / 2 - j - wid][n / 2 - i - len]);
        ans %= MOD;
      }
    }
  cout << ans;
  return 0;
}
