#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int n;
int a[200007], f[200007];
int sum;
int power(int a, int b) {
  int res = 1, now = a, left = b;
  while (left > 0) {
    if (left % 2 == 1) res = (1LL * res * now) % 1000000007;
    left /= 2;
    now = (1LL * now * now) % 1000000007;
  }
  return res;
}
int main() {
  n = read();
  for (int i = 1; i <= n; i++) {
    a[i] = read();
    sum += a[i];
  }
  f[0] = 0;
  f[1] = (1LL * power(sum, 1000000007 - 2) *
          ((1LL * (sum - 1) * (sum - 1)) % 1000000007)) %
         1000000007;
  for (int i = 1; i <= 100005; i++) {
    f[i + 1] =
        (2LL * f[i] - f[i - 1] -
         ((1LL * (sum - 1) * power(sum - i, 1000000007 - 2))) % 1000000007) %
        1000000007;
    f[i + 1] = (f[i + 1] + 1000000007) % 1000000007;
  }
  int ans = 0;
  for (int i = 1; i <= n; i++) ans = (ans + f[a[i]]) % 1000000007;
  printf("%d\n", ans);
  return 0;
}
