#include <bits/stdc++.h>
static const int MAXN = 200005;
static const int MODULUS = 1e9 + 7;
int fact[MAXN], fact_inv[MAXN];
inline int fpow(long long base, int exp) {
  long long ans = 1;
  for (; exp; exp >>= 1) {
    if (exp & 1) (ans *= base) %= MODULUS;
    (base *= base) %= MODULUS;
  }
  return (int)ans;
}
inline void preprocess() {
  fact[0] = 1;
  for (int i = 1; i < MAXN; ++i) fact[i] = (long long)fact[i - 1] * i % MODULUS;
  fact_inv[MAXN - 1] = fpow(fact[MAXN - 1], MODULUS - 2);
  for (int i = MAXN - 2; i >= 0; --i)
    fact_inv[i] = (long long)fact_inv[i + 1] * (i + 1) % MODULUS;
}
inline int binom(int n, int m) {
  if (n < m) return 0;
  return (long long)fact[n] * fact_inv[n - m] % MODULUS * fact_inv[m] % MODULUS;
}
int n;
char s[MAXN];
int l_ct[MAXN], r_ct[MAXN];
int main() {
  preprocess();
  gets(s);
  n = strlen(s);
  l_ct[0] = 0;
  for (int i = 0; i < n; ++i) l_ct[i + 1] = l_ct[i] + (s[i] == '(');
  r_ct[n] = 0;
  for (int i = n; i > 0; --i) r_ct[i - 1] = r_ct[i] + (s[i - 1] == ')');
  long long ans = 0;
  for (int i = 0; i < n; ++i)
    if (s[i] == '(') {
      int left = l_ct[i], right = r_ct[i + 1];
      (ans += binom(left + right, left + 1)) %= MODULUS;
    }
  printf("%I64d\n", ans);
  return 0;
}
