#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5, mod = 1e9 + 7;
char s[maxn];
int fact[maxn], inv[maxn], n, res, cnt;
vector<int> v;
int mypow(int base, int n) {
  if (!n) return 1;
  int ret = mypow(base, n / 2);
  ret = 1LL * ret * ret % mod;
  if (n & 1) ret = 1LL * ret * base % mod;
  return ret;
}
int c(int n, int k) {
  if (k > n) return 0;
  return 1LL * fact[n] * inv[k] % mod * inv[n - k] % mod;
}
int main() {
  fact[0] = 1;
  for (int i = 1; i < maxn; ++i) fact[i] = 1LL * fact[i - 1] * i % mod;
  for (int i = 0; i < maxn; ++i) inv[i] = mypow(fact[i], mod - 2);
  scanf("%s", s + 1);
  n = strlen(s + 1);
  for (int i = 1; i <= n; ++i)
    if (s[i] == '(')
      ++cnt;
    else
      v.push_back(cnt);
  for (int i = 0; i < v.size(); ++i) {
    res += c(v[i] + v.size() - i - 1, v.size() - i);
    res %= mod;
  }
  printf("%d\n", res);
}
