#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int n, a[2505], tot, f[100000 + 5], ans;
inline int pw(int x, int k) {
  int res = 1;
  for (; k; k >>= 1, x = 1LL * x * x % 1000000007)
    if (k & 1) res = 1LL * res * x % 1000000007;
  return res;
}
int main() {
  n = read();
  for (int i = 1; i <= n; ++i) tot += (a[i] = read());
  f[1] = 1LL * (tot - 1) * (tot - 1) % 1000000007 * pw(tot, 1000000007 - 2) %
         1000000007;
  for (int i = 2; i <= 100000; ++i)
    f[i] = (2LL * f[i - 1] - f[i - 2] + 1000000007 -
            1LL * (tot - 1) * pw(tot - i + 1, 1000000007 - 2) % 1000000007 +
            1000000007) %
           1000000007;
  for (int i = 1; i <= n; ++i) ans = (ans + f[a[i]]) % 1000000007;
  cout << ans;
  return 0;
}
