#include <bits/stdc++.h>
const int N(1e5 + 10), Mod(1e9 + 7);
int n, m, s, a[N], f[N], ans;
int fastpow(int x, int y) {
  int ans = 1;
  for (; y; y >>= 1, x = 1ll * x * x % Mod)
    if (y & 1) ans = 1ll * ans * x % Mod;
  return ans;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++)
    scanf("%d", a + i), m = std::max(m, a[i]), s = (s + a[i]) % Mod;
  f[1] = 1ll * (s - 1) * (s - 1) % Mod * fastpow(s, Mod - 2) % Mod;
  for (int i = 2; i <= m; i++)
    f[i] =
        (f[i - 1] - 1ll * (s - 1) * fastpow(s - i + 1, Mod - 2) % Mod + Mod) %
        Mod;
  for (int i = 2; i <= m; i++) f[i] = (f[i - 1] + f[i]) % Mod;
  for (int i = 1; i <= n; i++) ans = (ans + f[a[i]]) % Mod;
  printf("%d\n", ans);
  return 0;
}
