#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
const int mod = 1e9 + 7;
int gi() {
  int x = 0, o = 1;
  char ch = getchar();
  while (!isdigit(ch) && ch != '-') ch = getchar();
  if (ch == '-') o = -1, ch = getchar();
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return x * o;
}
int qpow(int a, int b) {
  int ret = 1;
  while (b) {
    if (b & 1) ret = 1ll * ret * a % mod;
    a = 1ll * a * a % mod, b >>= 1;
  }
  return ret;
}
int n, a[N], s, f[N];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) a[i] = gi(), s += a[i];
  f[1] = 1ll * (s - 1) * (s - 1) % mod * qpow(s, mod - 2) % mod;
  for (int i = 1; i + 1 < N; i++)
    f[i + 1] = (2ll * f[i] - f[i - 1] -
                1ll * (s - 1) * qpow(s - i, mod - 2) % mod + mod + mod) %
               mod;
  int ans = 0;
  for (int i = 1; i <= n; i++) ans = (ans + f[a[i]]) % mod;
  cout << ans;
  return 0;
}
