#include <bits/stdc++.h>
using namespace std;
const int mod = 1000 * 1000 * 1000 + 7;
inline int mul(int x, int y) { return 1LL * x * y % mod; }
inline void add(int &x, int y) {
  x += y;
  if (x >= mod) x -= mod;
}
int power(int a, int n) {
  int result = 1;
  while (n > 0) {
    if (n % 2) result = mul(result, a);
    a = mul(a, a);
    n /= 2;
  }
  return result;
}
int inv(int a) { return power(a, mod - 2); }
const int N = 3005;
const int M = 100005;
int n, sum, a[N], f[M];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < (n); ++i) {
    cin >> a[i];
    sum += a[i];
  }
  f[1] = mul(mul(sum - 1, sum - 1), inv(sum));
  for (int i = (2); i <= (M - 1); ++i) {
    add(f[i], mul(2, f[i - 1]));
    add(f[i], mod - f[i - 2]);
    add(f[i], mod - mul(sum - 1, inv(sum - i + 1)));
  }
  int result = 0;
  for (int i = 0; i < (n); ++i) {
    add(result, f[a[i]]);
  }
  cout << result << '\n';
  return 0;
}
