#include <bits/stdc++.h>
using namespace std;
char getc() {
  char c = getchar();
  while ((c < 'A' || c > 'Z') && (c < 'a' || c > 'z') && (c < '0' || c > '9'))
    c = getchar();
  return c;
}
int gcd(int n, int m) { return m == 0 ? n : gcd(m, n % m); }
int read() {
  int x = 0, f = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9')
    x = (x << 1) + (x << 3) + (c ^ 48), c = getchar();
  return x * f;
}
int n, m, u, a[2510], f[100010];
int ksm(int a, int k) {
  int s = 1;
  for (; k; k >>= 1, a = 1ll * a * a % 1000000007)
    if (k & 1) s = 1ll * s * a % 1000000007;
  return s;
}
int inv(int a) { return ksm(a, 1000000007 - 2); }
signed main() {
  n = read();
  for (int i = 1; i <= n; i++) m += a[i] = read(), u = max(u, a[i]);
  f[1] = 1ll * (m - 1) * (m - 1) % 1000000007 * inv(m) % 1000000007;
  for (int i = 2; i <= u; i++)
    f[i] = ((2 * f[i - 1] - f[i - 2] - 1ll * (m - 1) * inv(m - i + 1)) %
                1000000007 +
            1000000007) %
           1000000007;
  int ans = 0;
  for (int i = 1; i <= n; i++) ans = (ans + f[a[i]]) % 1000000007;
  cout << ans;
  return 0;
}
