#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
const int MOD = 1e9 + 7;
int dat[MAXN], f[MAXN];
inline int read() {
  int x = 0;
  char ch = getchar();
  while (!isdigit(ch)) ch = getchar();
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x;
}
inline void Add(int &x, int y) { x += y, x >= MOD && (x -= MOD); }
inline void Max(int &x, int y) {
  if (x < y) x = y;
}
inline int add(int x, int y) { return x + y >= MOD ? x + y - MOD : x + y; }
inline int qpow(int x, int y = MOD - 2) {
  long long r = 1, k = x;
  for (; y; y >>= 1, k *= k, k %= MOD)
    if (y & 1) r *= k, r %= MOD;
  return r;
}
int main() {
  int n = read(), s = 0, mx = 0, ans = 0;
  for (int i = 1; i <= n; i++) dat[i] = read(), s += dat[i], Max(mx, dat[i]);
  f[1] = 1ll * (s - 1) * (s - 1) % MOD * qpow(s) % MOD,
  f[2] = add(f[1], f[1] - 1);
  for (int i = 3; i <= mx; i++)
    f[i] = (1ll * f[i - 1] + f[i - 1] - f[i - 2] -
            1ll * (s - 1) * qpow(s - i + 1)) %
           MOD,
    Add(f[i], MOD);
  for (int i = 1; i <= n; i++) Add(ans, f[dat[i]]);
  return printf("%d\n", ans), 0;
}
