#include <bits/stdc++.h>
using namespace std;
int gi() {
  int x = 0, w = 1;
  char ch = getchar();
  while ((ch < '0' || ch > '9') && ch != '-') ch = getchar();
  if (ch == '-') w = 0, ch = getchar();
  while (ch >= '0' && ch <= '9')
    x = (x << 3) + (x << 1) + ch - '0', ch = getchar();
  return w ? x : -x;
}
const int N = 1e5 + 5;
const int mod = 1e9 + 7;
int n, a[N], S, f[N], ans;
int fastpow(int a, int b) {
  int res = 1;
  while (b) {
    if (b & 1) res = 1ll * res * a % mod;
    a = 1ll * a * a % mod;
    b >>= 1;
  }
  return res;
}
int main() {
  n = gi();
  for (int i = 1; i <= n; ++i) S += (a[i] = gi());
  f[1] = 1ll * (S - 1) * (S - 1) % mod * fastpow(S, mod - 2) % mod;
  for (int i = 1; i + 1 < N; ++i)
    f[i + 1] = (2ll * f[i] - f[i - 1] -
                1ll * (S - 1) * fastpow(S - i, mod - 2) % mod + mod + mod) %
               mod;
  for (int i = 1; i <= n; ++i) ans = (ans + f[a[i]]) % mod;
  printf("%d\n", ans);
  return 0;
}
