#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long dp[200005], sum = 0;
int n, m = 0;
int a[200005];
long long qpow(long long a, int b) {
  long long ans = 1;
  for (; b; b >>= 1, a = a * a % mod)
    if (b & 1) ans = ans * a % mod;
  return ans;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", a + i);
    sum += a[i];
    m = max(m, a[i]);
  }
  dp[1] = (sum - 1) * (sum - 1) % mod * qpow(sum, mod - 2) % mod;
  dp[2] = (2 * dp[1] % mod - 1 + mod) % mod;
  for (int i = 2; i < m; i++)
    dp[i + 1] =
        ((2 * dp[i] % mod - dp[i - 1] - (sum - 1) * qpow(sum - i, mod - 2)) %
             mod +
         mod) %
        mod;
  long long ans = 0;
  for (int i = 1; i <= n; i++) ans = (ans + dp[a[i]]) % mod;
  printf("%lld\n", ans);
}
