#include <bits/stdc++.h>
using namespace std;
void init();
void solve();
int main() {
  try {
    init();
    solve();
  } catch (const char* s) {
    return 0;
  }
  return 0;
}
template <class T>
inline bool checkMin(T& a, T b) {
  return (a > b ? a = b, 1 : 0);
}
template <class T>
inline bool checkMax(T& a, T b) {
  return (a < b ? a = b, 1 : 0);
}
class Scanner {
 private:
  istream& ist;

 public:
  Scanner(istream& in) : ist(in) {}
  string next() {
    string r;
    ist >> r;
    return r;
  }
  string nextLine() {
    string r;
    getline(ist, r);
    return r;
  }
  long long nextInt() {
    long long r;
    ist >> r;
    return r;
  }
  double nextDouble() {
    double r;
    ist >> r;
    return r;
  }
  char nextChar() {
    char r;
    ist >> r;
    return r;
  }
};
Scanner sc(cin);
void ALERT(bool judgememt, const char* phrase) {
  if (judgememt) {
    puts(phrase);
    throw "ALERT";
  }
}
bool alert(bool judgememt, const char* phrase) {
  if (judgememt) puts(phrase);
  return judgememt;
}
const long long MOD = 1e9 + 7;
const long long N = 2505;
const long long M = 100005;
long long a[N];
long long n;
void init() {
  scanf("%lld", &n);
  for (long long i = 0; i < n; i++) scanf("%lld", &a[i]);
}
inline long long power(long long a, long long b) {
  ((a %= MOD) += MOD) %= MOD;
  long long r = 1;
  while (b) {
    if (b & 1) (r *= a) %= MOD;
    (a *= a) %= MOD;
    b >>= 1;
  }
  return r;
}
inline long long inv(long long u) { return power(u, MOD - 2); }
long long f[M];
void solve() {
  long long s = 0;
  for (long long i = 0; i < n; i++) s += a[i];
  long long m = 0;
  for (long long i = 0; i < n; i++) checkMax(m, a[i]);
  f[0] = 0;
  f[1] = (s - 1) * (s - 1) % MOD * inv(s) % MOD;
  for (long long i = 1; i <= m - 1; i++)
    f[i + 1] = ((2 * f[i] - f[i - 1] + MOD) % MOD -
                (s - 1 + MOD) * inv(s - i) % MOD + MOD) %
               MOD;
  for (long long i = 0; i < m + 1; i++)
    ;
  long long ans = 0;
  for (long long i = 0; i < n; i++) (ans += f[a[i]]) %= MOD;
  printf("%lld\n", ans);
}
