#include <bits/stdc++.h>
const int MAXN = 2.5e3 + 10, MAXV = 1e5 + 10, MOD = 1e9 + 7;
inline int add(int x, int y) { return x + y >= MOD ? x + y - MOD : x + y; }
inline int sub(int x, int y) { return x < y ? x - y + MOD : x - y; }
inline int mul(int x, int y) { return 1LL * x * y - 1LL * x * y / MOD * MOD; }
inline int Qpow(int a, int b) {
  int ans = 1;
  for (; b; a = mul(a, a), b >>= 1)
    if (b & 1) ans = mul(ans, a);
  return ans;
}
inline int inv(int x) { return Qpow(x, MOD - 2); }
int n, S;
int a[MAXN], dp[MAXV];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", a + i), S += a[i];
  dp[1] = mul(mul(S - 1, S - 1), inv(S)), dp[2] = sub(add(dp[1], dp[1]), 1);
  for (int i = 2; i < std::min(S, 100000); ++i)
    dp[i + 1] = sub(add(dp[i], dp[i]), add(dp[i - 1], mul(S - 1, inv(S - i))));
  int ans = 0;
  for (int i = 1; i <= n; ++i) ans = add(ans, dp[a[i]]);
  printf("%d\n", ans);
  return 0;
}
