#include <bits/stdc++.h>
const int N = 1e5 + 5;
const int mod = 1e9 + 7;
using namespace std;
int n, a[N], mx, m, f[N], ans;
template <typename T>
inline T read() {
  T x = 0, w = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') w = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar();
  return x * w;
}
int fpow(int x, int y) {
  int res = 1;
  for (; y; y >>= 1, x = 1ll * x * x % mod)
    if (y & 1) res = 1ll * res * x % mod;
  return res;
}
int main() {
  n = read<int>();
  for (int i = 1; i <= n; i++)
    a[i] = read<int>(), mx = max(mx, a[i]), m = (m + a[i]) % mod;
  f[1] = 1ll * (m - 1) * (m - 1) % mod * fpow(m, mod - 2) % mod;
  f[2] = (2ll * f[1] - 1 + mod) % mod;
  for (int i = 3; i <= mx; i++)
    f[i] = (2ll * f[i - 1] - f[i - 2] -
            1ll * (m - 1) * fpow(m - i + 1, mod - 2) % mod + 2ll * mod) %
           mod;
  for (int i = 1; i <= n; i++) ans = (ans + f[a[i]]) % mod;
  printf("%d\n", ans);
  return 0;
}
