#include <bits/stdc++.h>
using namespace std;
inline int gi() {
  register int data = 0, w = 1;
  register char ch = 0;
  while (!isdigit(ch) && ch != '-') ch = getchar();
  if (ch == '-') w = -1, ch = getchar();
  while (isdigit(ch)) data = 10 * data + ch - '0', ch = getchar();
  return w * data;
}
const int Mod = 1e9 + 7;
const int MAX_N = 2.5e3 + 5, MAX_V = 1e5 + 5;
int fpow(int x, int y) {
  int res = 1;
  while (y) {
    if (y & 1) res = 1ll * res * x % Mod;
    x = 1ll * x * x % Mod;
    y >>= 1;
  }
  return res;
}
int N, sum, mx, a[MAX_N], f[MAX_V];
int main() {
  N = gi();
  for (int i = 1; i <= N; i++) a[i] = gi();
  for (int i = 1; i <= N; i++) sum += a[i], mx = max(a[i], mx);
  f[1] = 1ll * fpow(sum - 1, 2) * fpow(sum, Mod - 2) % Mod;
  f[2] = (2 * f[1] - 1) % Mod;
  for (int i = 3; i <= mx; i++) {
    f[i] = (2 * f[i - 1] % Mod - f[i - 2] + Mod) % Mod;
    f[i] =
        (f[i] - 1ll * (sum - 1) * fpow(sum - i + 1, Mod - 2) % Mod + Mod) % Mod;
  }
  int ans = 0;
  for (int i = 1; i <= N; i++) ans = (ans + f[a[i]]) % Mod;
  printf("%d\n", ans);
  return 0;
}
