#include <bits/stdc++.h>
using namespace std;
long long n, m, k;
long long read() {
  long long s = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    s = s * 10 + ch - '0';
    ch = getchar();
  }
  return s * f;
}
inline void print(long long *f, long long len) {
  for (long long i = 0; i < len; i++) printf("%lld ", f[i]);
  puts("");
}
long long f[303030], w[101010], sum;
const long long mod = 1e9 + 7;
long long qpow(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = ans * a % mod;
    a = a * a % mod;
    b >>= 1;
  }
  return ans;
}
long long inv(long long x) { return qpow(x, mod - 2); }
long long F(long long x) { return (m - 1) * (m - x) % mod * f[x - 1] % mod; }
signed main() {
  n = read();
  long long mx = -1;
  for (long long i = 1, iend = n; i <= iend; ++i)
    w[i] = read(), m += w[i], mx = max(mx, w[i]);
  f[0] = inv(m);
  for (long long i = 1, iend = min(mx, m - 1); i <= iend; ++i)
    f[i] = f[i - 1] + inv(m - i), f[i] %= mod;
  long long ans = 0;
  for (long long i = 1, iend = n; i <= iend; ++i) ans += F(w[i]), ans %= mod;
  cout << ans;
}
