#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long f = 1, ans = 0;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    ans = ans * 10 + c - '0';
    c = getchar();
  }
  return f * ans;
}
const long long MAXN = 1e5 + 11;
long long f[MAXN], Maxn, Inv, N, A[MAXN], sum;
long long ksm(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans *= a, ans %= 1000000007;
    a *= a, a %= 1000000007;
    b >>= 1;
  }
  return ans;
}
long long p(long long x) {
  return Inv * x % 1000000007 * (sum - x) % 1000000007;
}
signed main() {
  N = read();
  for (long long i = 1; i <= N; i++)
    A[i] = read(), Maxn = max(Maxn, A[i]), sum += A[i];
  f[1] = (sum - 1) * (sum - 1) % 1000000007 * ksm(sum, 1000000007 - 2) %
         1000000007;
  Inv = ksm(sum * (sum - 1) % 1000000007, 1000000007 - 2);
  f[2] = 2 * f[1] % 1000000007 - 1;
  f[2] = (f[2] + 1000000007) % 1000000007;
  for (long long i = 2; i < Maxn; i++) {
    long long w = 2 * p(i) * f[i] % 1000000007 - f[i - 1] * p(i) % 1000000007 -
                  i * ksm(sum, 1000000007 - 2) % 1000000007;
    w %= 1000000007;
    if (w < 0) w += 1000000007;
    w *= ksm(p(i), 1000000007 - 2);
    w %= 1000000007;
    f[i + 1] = w;
  }
  long long res = 0;
  for (long long i = 1; i <= N; i++) res += f[A[i]], res %= 1000000007;
  printf("%lld\n", res);
  return 0;
}
