#include <bits/stdc++.h>
using namespace std;
const int _ = 2501, __ = 1e5 + 12;
int n, S, a[_], maxa, f[__], sum[__];
const int mod = 1e9 + 7;
inline int poww(register int a, register int b) {
  register int ret = 1, Base = a;
  for (; b; b >>= 1, Base = 1LL * Base * Base % mod)
    if (b & 1) ret = 1LL * ret * Base % mod;
  return ret;
}
int main() {
  scanf("%d", &n);
  for (register int i = 1; i <= n; ++i)
    scanf("%d", &a[i]), S += a[i], maxa = max(maxa, a[i]);
  sum[0] = poww(S, mod - 2);
  for (register int i = 1; i <= maxa; ++i)
    sum[i] = (sum[i - 1] + poww(S - i, mod - 2)) % mod;
  for (register int x = 1; x <= maxa; ++x)
    f[x] = 1LL * (S - 1) * (S - x) % mod * sum[x - 1] % mod;
  register int ans = 0;
  for (register int i = 1; i <= n; ++i) ans += f[a[i]], ans %= mod;
  printf("%d\n", ans);
}
