#include <bits/stdc++.h>
using namespace std;
long long powM(long long a, long long t = 1000000007 - 2) {
  long long ans = 1;
  while (t) {
    if (t & 1) ans = ans * a % 1000000007;
    a = a * a % 1000000007;
    t >>= 1;
  }
  return ans;
}
int n, lim, a[2550];
long long S, f[100500], ans;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    lim = max(lim, a[i]);
    S += a[i];
  }
  S %= 1000000007;
  f[1] = (S - 1) * (S - 1) % 1000000007 * powM(S) % 1000000007;
  f[2] = (2 * f[1] - 1) % 1000000007;
  for (int i = 2; i < lim; i++)
    f[i + 1] = (2 * f[i] - f[i - 1] - (S - 1) * powM(S - i)) % 1000000007;
  for (int i = 1; i <= n; i++) ans += f[a[i]];
  ans = (ans % 1000000007 + 1000000007) % 1000000007;
  printf("%lld", ans);
  return 0;
}
