#include <bits/stdc++.h>
using namespace std;
const int inf = 2147483647;
const int mod = 1e9 + 7;
const int N = 2501;
int _max(int x, int y) { return x > y ? x : y; }
int _min(int x, int y) { return x < y ? x : y; }
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9')
    x = (x << 3) + (x << 1) + (ch ^ 48), ch = getchar();
  return x * f;
}
void put(int x) {
  if (x < 0) putchar('-'), x = -x;
  if (x >= 10) put(x / 10);
  putchar(x % 10 + '0');
}
int a[N], t[100001];
int add(int x, int y) {
  x += y;
  return x >= mod ? x - mod : x;
}
int dec(int x, int y) {
  x -= y;
  return x < 0 ? x + mod : x;
}
int pow_mod(int a, int k) {
  int ans = 1;
  for (; k; k >>= 1, a = (long long)a * a % mod)
    if (k & 1) ans = (long long)ans * a % mod;
  return ans;
}
int main() {
  int n = read(), s = 0, mx = 0;
  for (int i = 1; i <= n; i++) a[i] = read(), s += a[i], mx = _max(mx, a[i]);
  t[1] = (long long)(s - 1) * (s - 1) % mod * pow_mod(s, mod - 2) % mod;
  t[2] = dec(2LL * t[1] % mod, 1);
  for (int i = 2; i <= mx; i++) {
    if (i == s) continue;
    t[i + 1] = dec(dec(2LL * t[i] % mod, t[i - 1]),
                   (long long)(s - 1) * pow_mod(s - i, mod - 2) % mod);
  }
  int ans = 0;
  for (int i = 1; i <= n; i++) ans = add(ans, t[a[i]]);
  put(ans), puts("");
  return 0;
}
