#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long sum, ma, n, s, f[100010], ans;
long long a[1000010];
long long ksm(long long a, long long b) {
  long long tot = 1, tmp = a;
  while (b) {
    if (b & 1) tot = tot * tmp % mod;
    tmp = tmp * tmp % mod;
    b >>= 1;
  }
  return tot;
}
signed main() {
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
    ma = max(ma, a[i]);
    s += a[i];
  }
  f[1] = (s - 1) * (s - 1) % mod * ksm(s, mod - 2) % mod;
  f[0] = 0;
  for (long long i = 2; i <= ma; i++) {
    f[i] = (f[i - 1] * 2LL - f[i - 2] + mod -
            (s - 1) * ksm(s - i + 1, mod - 2) % mod) %
               mod +
           mod;
    f[i] += mod;
    f[i] %= mod;
  }
  for (long long i = 1; i <= n; i++) {
    ans += f[a[i]] + mod;
    ans %= mod;
  }
  cout << ans;
}
