#include <bits/stdc++.h>
using namespace std;
const int NR = 1e5 + 10;
const int mod = 1e9 + 7;
void Max(int& x, int y) { x = max(x, y); }
int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 3) + (x << 1) + (ch ^ 48);
    ch = getchar();
  }
  return x * f;
}
int n, mx;
long long S;
int a[NR];
long long dp[NR], ans;
long long ksm(long long a, int b) {
  long long res = 1;
  a %= mod;
  while (b) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
    b >>= 1;
  }
  return res;
}
int main() {
  n = read();
  for (int i = 1; i <= n; i++) a[i] = read(), Max(mx, a[i]), S += a[i];
  S %= mod;
  dp[0] = 0, dp[1] = 1ll * (S - 1) * (S - 1) % mod * (ksm(S, mod - 2)) % mod;
  dp[2] = (dp[1] * 2 - 1) % mod;
  for (int i = 2; i < mx; i++) {
    long long P = 1ll * i * (S - i) % mod * ksm(S * (S - 1) % mod, mod - 2);
    dp[i + 1] = (2ll * dp[i] % mod - dp[i - 1] -
                 1ll * (S - 1) * ksm(S - i, mod - 2) % mod) %
                mod;
    dp[i + 1] = (dp[i + 1] % mod + mod) % mod;
  }
  for (int i = 1; i <= n; i++) ans = (ans + dp[a[i]]) % mod;
  printf("%lld\n", ans);
  return 0;
}
