#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7, N = 111111;
long long a[N], S;
long long pw(long long a, long long b) {
  long long an = 1;
  for (; b; b >>= 1) {
    if (b & 1) an = 1ll * an * a % mod;
    a = 1ll * a * a % mod;
  }
  return an;
}
long long fix(long long x) { return (x % mod + mod) % mod; }
long long inv(long long x) { return pw(x, mod - 2); }
long long f[N], n, ans;
int main() {
  scanf("%d", &n);
  for (long long i = 1; i <= n; ++i) scanf("%d", &a[i]), S += a[i];
  f[1] = 1ll * (S - 1) * (S - 1) % mod * inv(S) % mod;
  for (long long i = 1; i <= 100000; ++i)
    f[i + 1] = fix(2ll * f[i] - f[i - 1] - (S - 1) * inv(S - i) % mod);
  for (long long i = 1; i <= n; ++i) (ans += f[a[i]]) %= mod;
  cout << ans << endl;
  return 0;
}
