#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline bool chkmin(T &x, T y) {
  return y < x ? x = y, 1 : 0;
}
template <typename T>
inline bool chkmax(T &x, T y) {
  return x < y ? x = y, 1 : 0;
}
const int INF = 0x3f3f3f3f;
const int N = 2500 + 10, Lim = 1e5 + 10;
const int mod = 1e9 + 7, Inv = (mod + 1) / 2;
int a[N], f[Lim];
inline int read() {
  int x = 0, flag = 1;
  char ch = getchar();
  while (!isdigit(ch) && ch != '-') ch = getchar();
  if (ch == '-') flag = -1, ch = getchar();
  while (isdigit(ch)) x = (x << 3) + (x << 1) + (ch - '0'), ch = getchar();
  return x * flag;
}
inline int fpm(int bs, int b) {
  int res = 1;
  while (b) {
    if (b & 1) res = 1ll * res * bs % mod;
    bs = 1ll * bs * bs % mod, b /= 2;
  }
  return res;
}
int main() {
  int n = read(), ans = 0, lim = 1e5;
  long long sum = 0;
  for (int i = (1), iend = (n); i <= iend; i++) a[i] = read(), sum += a[i];
  f[1] = 1ll * (sum - 1) * (sum - 1) % mod * fpm(sum, mod - 2) % mod;
  for (int i = (2), iend = (lim); i <= iend; i++)
    f[i] = (2ll * f[i - 1] - f[i - 2] -
            1ll * (sum - 1) * fpm(sum - i + 1, mod - 2) % mod + 2 * mod) %
           mod;
  for (int i = (1), iend = (n); i <= iend; i++) ans = (ans + f[a[i]]) % mod;
  printf("%d\n", ans);
  return 0;
}
