#include <bits/stdc++.h>
using namespace std;
using LL = long long;
const int mod = 1e9 + 7;
int inv(int x, int ans = 1) {
  for (int i = mod - 2; i; i >>= 1, x = (LL)x * x % mod)
    if (i & 1) ans = (LL)ans * x % mod;
  return ans;
}
const int NN = 100010;
LL f[NN + 10];
int a[3333];
int main() {
  int n = 0, m;
  scanf("%d", &m);
  for (int i = 1; i <= m; i++) {
    scanf("%d", a + i);
    n += a[i];
  }
  f[1] = (LL)(n - 1) * (n - 1) % mod * inv(n) % mod;
  for (int i = 1; i < NN; i++) {
    f[i + 1] = (2 * f[i] - f[i - 1] - (LL)(n - 1) * inv(n - i)) % mod;
    if (f[i + 1] < 0) f[i + 1] += mod;
  }
  int ans = 0;
  for (int i = 1; i <= m; i++) {
    ans += f[a[i]];
    if (ans >= mod) ans -= mod;
  }
  printf("%d\n", ans);
  return 0;
}
