#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1000000007LL;
const int maxn = 200200;
int len;
char str[maxn];
long long int inv[maxn], jc[maxn], jcv[maxn];
void init() {
  inv[1] = 1;
  jc[0] = 1;
  jcv[1] = 1;
  jc[1] = 1;
  jcv[1] = 1;
  for (int i = 2; i < maxn; i++) {
    inv[i] = inv[mod % i] * (mod - mod / i) % mod;
    jc[i] = (jc[i - 1] * i) % mod;
    jcv[i] = (jcv[i - 1] * inv[i]) % mod;
  }
}
long long int C(long long int n, long long int m) {
  if (m < 0 || m > n) return 0LL;
  if (m == 0 || m == n) return 1LL;
  long long int ret = ((jc[n] * jcv[n - m]) % mod * jcv[m]) % mod;
  return ret;
}
int main() {
  init();
  while (scanf("%s", str) != EOF) {
    len = strlen(str);
    long long int left = 0, right = 0;
    for (int i = 0; i < len; i++) {
      if (str[i] == ')') right++;
    }
    long long int ans = 0;
    for (int i = 0; i < len; i++) {
      if (str[i] == ')') {
        right--;
        if (right == 0) break;
      } else if (str[i] == '(') {
        left++;
        ans = (ans + C(left + right - 1, left)) % mod;
      }
    }
    printf("%I64d\n", ans);
  }
  return 0;
}
