#include <bits/stdc++.h>
inline int in() {
  int k = 0;
  char ch = getchar();
  while (ch < '-') ch = getchar();
  while (ch > '-') k = k * 10 + ch - '0', ch = getchar();
  return k;
}
const int YL = 1e9 + 7, N = 1e5 + 5, M = N - 5;
int f[N], a[N];
inline int MO(const int &x) { return x >= YL ? x - YL : x; }
inline int ksm(int a, int k) {
  int r = 1;
  while (k) {
    if (k & 1) r = 1ll * r * a % YL;
    a = 1ll * a * a % YL, k >>= 1;
  }
  return r;
}
int main() {
  int n = in(), s = 0;
  for (int i = 1; i <= n; ++i) a[i] = in(), s += a[i];
  f[1] = 1ll * (s - 1) * (s - 1) % YL * ksm(s, YL - 2) % YL;
  f[2] = (2ll * f[1] - 1 + YL) % YL;
  for (int i = 2; i <= M; ++i)
    f[i + 1] = ((2ll * f[i] - f[i - 1] + YL) % YL -
                1ll * (s - 1) * ksm(s - i, YL - 2) % YL + YL) %
               YL;
  int ans = 0;
  for (int i = 1; i <= n; ++i) ans = MO(ans + f[a[i]]);
  printf("%d\n", ans);
  return 0;
}
