#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int N = 1e5 + 10;
long long pow_mod(long long a, long long n, long long mod) {
  long long r = 1;
  for (; n; n >>= 1) {
    if (n & 1) r = r * a % mod;
    a = a * a % mod;
  }
  return r;
}
long long inv(long long x) { return pow_mod(x, mod - 2, mod); }
long long dp[N];
int a[N];
int main() {
  int n;
  scanf("%d", &n);
  long long sum = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    sum += a[i];
  }
  dp[0] = 0;
  dp[1] = (sum - 1) * (sum - 1) % mod * inv(sum) % mod;
  for (int i = 1; i + 1 < N; i++) {
    dp[i + 1] = (2 * dp[i] - dp[i - 1] - (sum - 1) * inv(sum - i)) % mod;
    dp[i + 1] %= mod;
    dp[i + 1] = (dp[i + 1] + mod) % mod;
  }
  long long ret = 0;
  for (int i = 0; i < n; i++) ret = (ret + dp[a[i]]) % mod;
  printf("%I64d\n", ret);
}
