#include <bits/stdc++.h>
using namespace std;
const int N = 2550;
const long long mod = 1e9 + 7;
long long Ans = 0;
long long a[N], dp[100010];
int n;
long long sum;
long long qpow(long long a, long long b) {
  long long ans = 1ll;
  while (b) {
    if (b & 1) ans = ans * a % mod;
    a = a * a % mod;
    b >>= 1;
  }
  return ans;
}
int main() {
  scanf("%d", &n);
  long long maxx = 0;
  for (int i = 1; i <= n; i++)
    scanf("%lld", &a[i]), sum = (sum + a[i]) % mod, maxx = max(maxx, a[i]);
  dp[1] = (sum - 1) * (sum - 1) % mod * qpow(sum, mod - 2) % mod;
  dp[0] = 0;
  for (int i = 2; i <= maxx; i++) {
    dp[i] = (dp[i - 1] * 2 % mod - dp[i - 2] + mod -
             (sum - 1) * qpow(sum - i + 1, mod - 2) % mod + mod) %
            mod;
  }
  for (int i = 1; i <= n; i++) Ans = (Ans + dp[a[i]]) % mod;
  cout << Ans << endl;
}
