#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18;
const long long mod = 1e9 + 7;
const long long maxn = 2e5 + 10;
long long open[maxn], close[maxn];
long long fact[maxn];
long long fact_rev[maxn];
pair<long long, long long> gcd(long long a, long long b) {
  if (b == 0) return make_pair(a, 0);
  pair<long long, long long> p = gcd(b, a % b);
  return make_pair(p.second, p.first - ((a / b) * p.second));
}
inline long long rev(long long a) { return (gcd(a, mod).first + mod) % mod; }
inline long long C(long long n, long long k) {
  if (n < k) return 0;
  return (((fact[n] * fact_rev[k]) % mod) * fact_rev[n - k]) % mod;
}
int main() {
  fact[0] = 1;
  for (long long i = 1; i <= maxn - 1; i++) fact[i] = (fact[i - 1] * i) % mod;
  for (long long i = 0; i <= maxn - 1; i++) fact_rev[i] = rev(fact[i]);
  string s;
  cin >> s;
  for (long long i = 0; i < (s).size(); i++) {
    long long bef = (i == 0 ? 0 : open[i - 1]);
    open[i] = bef + (s[i] == '(');
  }
  for (long long i = (s).size() - 1; i >= 0; i--) {
    close[i] = close[i + 1] + (s[i] == ')');
  }
  long long ans = 0;
  for (long long i = 0; i < (s).size(); i++) {
    if (s[i] == '(') {
      ans += C(open[i] + close[i] - 1, open[i]);
      ans %= mod;
    }
  }
  cout << ans;
}
