#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 1, mod = 1e9 + 7;
int n, m, s, ans, a[N], g[N], f[N];
void check(int& x) { x -= mod, x += x >> 31 & mod; }
int Pow(long long int t, int x, long long int s = 1) {
  for (; x; x >>= 1, t = t * t % mod)
    if (x & 1) s = s * t % mod;
  return s;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", a + i), m = max(a[i], m), s += a[i];
  for (int i = 0; i <= m; i++) check(g[i + 1] = g[i] + Pow(s - i, mod - 2));
  for (int i = 1; i <= m; i++) f[i] = 1ll * g[i] * (s - i) % mod;
  for (int i = 1; i <= n; i++) check(ans += f[a[i]]);
  return cout << 1ll * (s - 1) * ans % mod, 0;
}
