#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 2500 + 10;
const int MAX_C = 100000 + 10;
const int MOD = 1e9 + 7;
int inv(int x) {
  if (x == 1) return x;
  return 1LL * (MOD - MOD / x) * inv(MOD % x) % MOD;
}
int c, a[MAX_N], n, f[MAX_C];
int main() {
  scanf("%d", &c);
  int mx = 0;
  for (int i = 1; i <= c; i++) {
    scanf("%d", &a[i]);
    n += a[i];
    mx = max(mx, a[i]);
  }
  f[0] = 0;
  f[1] = 1LL * (n - 1) * (n - 1) % MOD * inv(n) % MOD;
  for (int i = 2; i <= mx; i++) {
    f[i] = (f[i] + 1LL *
                       (2LL * f[i - 1] % MOD - f[i - 2] -
                        1LL * (n - 1) * inv(n - i + 1) % MOD + 2 * MOD) %
                       MOD) %
           MOD;
  }
  int ans = 0;
  for (int i = 1; i <= c; i++) {
    ans = (ans + f[a[i]]) % MOD;
  }
  printf("%d\n", ans);
  return 0;
}
