#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, y = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') y = -y;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * y;
}
namespace qiqi {
const int N = 2505, M = 1e5 + 5, P = 1e9 + 7;
int n, m, mx, c[N], f[M];
inline int pow(int b, int k) {
  int a = 1;
  while (k) {
    if (k & 1) a = 1LL * a * b % P;
    b = 1LL * b * b % P;
    k >>= 1;
  }
  return a;
}
void main() {
  n = read();
  for (int i = (1); i <= (n); ++i) {
    c[i] = read();
    m += c[i];
    mx = max(mx, c[i]);
  }
  for (int i = (1); i <= (mx); ++i)
    f[i + 1] = (f[i] - 1LL * (m - 1) * pow(m - i, P - 2) % P) % P;
  for (int i = (1); i <= (mx); ++i) f[i] = (f[i] + f[i - 1]) % P;
  int ans = 1LL * (m - 1) * (m - 1) % P;
  for (int i = (1); i <= (n); ++i) ans = (ans + f[c[i]]) % P;
  printf("%d\n", (ans + P) % P);
}
}  // namespace qiqi
int main() {
  qiqi::main();
  return 0;
}
