#include <bits/stdc++.h>
char ch;
bool fs;
void re(int& x) {
  while (ch = getchar(), ch < 33)
    ;
  if (ch == '-')
    fs = 1, x = 0;
  else
    fs = 0, x = ch - 48;
  while (ch = getchar(), ch > 33) x = x * 10 + ch - 48;
  if (fs) x = -x;
}
using namespace std;
const int mod = 1000000007;
int n, sum, a[2501], f[100001];
int mi(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() {
  re(n);
  for (int i = 1; i <= n; ++i) re(a[i]), sum += a[i];
  f[1] = (sum - 1ll) * (sum - 1) % mod * mi(sum, mod - 2) % mod;
  f[2] = (2 * f[1] - 1) % mod;
  for (int i = 3; i <= 100000; ++i)
    f[i] =
        (2ll * f[i - 1] - f[i - 2] - (sum - 1ll) * mi(sum - i + 1, mod - 2)) %
        mod;
  int ans = 0;
  for (int i = 1; i <= n; ++i) ans = (ans + f[a[i]]) % mod;
  ans = (ans + mod) % mod;
  printf("%d\n", ans);
}
