#include <bits/stdc++.h>
long long gi() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) f ^= ch == '-', ch = getchar();
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return f ? x : -x;
}
int pow(int x, int y) {
  int ret = 1;
  while (y) {
    if (y & 1) ret = 1ll * ret * x % 1000000007;
    x = 1ll * x * x % 1000000007;
    y >>= 1;
  }
  return ret;
}
int a[2510], S, g[100010];
int main() {
  int n = gi();
  for (int i = 1; i <= n; ++i) S += a[i] = gi();
  g[1] = 1ll * pow(S, 1000000007 - 2) * (S - 1) % 1000000007 * (S - 1) %
         1000000007;
  g[2] = (2ll * g[1] - 1) % 1000000007;
  for (int i = 2; i <= 100000; ++i)
    g[i + 1] =
        (g[i] * 2ll - g[i - 1] + 1000000007 -
         1ll * (S - 1) * pow(S - i, 1000000007 - 2) % 1000000007 + 1000000007) %
        1000000007;
  int ans = 0;
  for (int i = 1; i <= n; ++i) ans = (ans + g[a[i]]) % 1000000007;
  printf("%d\n", ans);
  return 0;
}
