#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int maxn = 1e5 + 5;
int f[maxn], g[maxn];
int a[maxn];
int qm(int a, int b) {
  int res = 1;
  while (b) {
    if (b & 1) res = (long long)res * a % mod;
    a = (long long)a * a % mod;
    b >>= 1;
  }
  return res;
}
int main() {
  int n, m = 0;
  cin >> n;
  for (int i = (1); i < (n + 1); ++i) scanf("%d", &a[i]), m += a[i];
  g[0] = m - 1;
  for (int i = (1); i < (maxn); ++i)
    g[i] = (g[i - 1] + (1 - m) * (long long)qm(m - i + 1, mod - 2) % mod) % mod;
  f[0] = 0;
  for (int i = 1; i < maxn; ++i) f[i] = (f[i - 1] + g[i]) % mod;
  int s = 0;
  for (int i = (1); i < (n + 1); ++i) s = (s + f[a[i]]) % mod;
  int ans = s % mod;
  ans = (ans + mod) % mod;
  cout << ans << endl;
  return 0;
}
