#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7, N = 1e5 + 77;
long long f[N];
int m, n, cnt[N];
char str[N];
long long power(long long x, long long t) {
  long long b = 1;
  while (t) {
    if (t & 1) b = b * x % mod;
    x = x * x % mod;
    t >>= 1;
  }
  return b;
}
int main() {
  int i, ans = 0;
  scanf("%d", &m), n = 0;
  for (int i = 1; i <= m; i++) scanf("%d", &cnt[i]), n += cnt[i];
  f[1] = 1ll * (n - 1) * (n - 1) % mod * power(n, mod - 2) % mod;
  for (int i = 1; i < N - 1; i++)
    f[i + 1] =
        ((2 * f[i] - f[i - 1] - (n - 1) * power(n - i, mod - 2) % mod) % mod +
         mod) %
        mod;
  for (int i = 1; i <= m; i++) (ans += f[cnt[i]]) %= mod;
  printf("%d", ans);
}
