#include <bits/stdc++.h>
using namespace std;
const int N = 2505, MAXA = 100005, P = 1e9 + 7;
int ad(int k1, int k2) { return k1 += k2 - P, k1 += k1 >> 31 & P; }
int su(int k1, int k2) { return k1 -= k2, k1 += k1 >> 31 & P; }
int mu(int k1, int k2) { return 1LL * k1 * k2 % P; }
int mu(int k1, int k2, int k3) { return 1LL * k1 * k2 % P * k3 % P; }
int po(int k1, int k2) {
  int k3 = 1;
  for (; k2; k2 >>= 1, k1 = mu(k1, k1))
    if (k2 & 1) k3 = mu(k3, k1);
  return k3;
}
int n, m, a[N], f[MAXA], inv[MAXA];
int calc(int x) {
  int k1 = 0, k2 = 0;
  for (int j = (1); j <= (x - 1); ++j) {
    k1 = ad(k1, inv[j]);
    k2 = ad(k2, mu(inv[j], j));
  }
  return su(mu(k1, su(1, m), x), mu(k2, su(1, m)));
}
int main() {
  inv[0] = inv[1] = 1;
  scanf("%d", &n);
  for (int i = (1); i <= (n); ++i) scanf("%d", &a[i]), m += a[i];
  for (int i = (0); i <= (MAXA - 1); ++i) {
    inv[i] = po(m - i, P - 2);
  }
  int cur = 0;
  for (int i = (1); i <= (n); ++i) {
    cur = ad(cur, calc(a[i]));
  }
  int endval = mu(su(1, m), m - 1);
  printf("%d\n", su(cur, endval));
  return 0;
}
