#include <bits/stdc++.h>
int mu = 1000000007;
int n, a[2505], s;
int f[100005], mx, ans;
int ksm(int x, int y) {
  int ans = 1;
  for (; y; y >>= 1, x = x * 1ll * x % mu)
    if (y & 1) ans = ans * 1ll * x % mu;
  return ans;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++)
    scanf("%d", &a[i]), s += a[i], mx = std::max(mx, a[i]);
  f[1] = (s - 1) * 1ll * (s - 1) % mu * ksm(s, mu - 2) % mu;
  for (int i = 1; i <= mx; i++) {
    f[i + 1] =
        (2ll * f[i] - f[i - 1] - (s - 1) * 1ll * ksm(s - i, mu - 2)) % mu;
    f[i + 1] = (f[i + 1] + mu) % mu;
  }
  for (int i = 1; i <= n; i++) ans = (ans + f[a[i]]) % mu;
  printf("%d\n", ans);
}
