#include <bits/stdc++.h>
using namespace std;
const long long modulo = 1000000007;
const long long mod = 1000000007;
const unsigned gen_seed =
    std::chrono::system_clock::now().time_since_epoch().count();
std::mt19937_64 gen(gen_seed);
long long gcd(long long a, long long b, long long& x, long long& y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  }
  long long x1, y1;
  long long d = gcd(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return d;
}
long long invmod(long long a, long long modulo) {
  long long x, y;
  gcd(a, modulo, x, y);
  return (x % modulo + modulo) % modulo;
}
long long powM(long long k, long long n) {
  if (n == 0) return 1;
  if (n == 1) return k;
  long long x = powM(k, n / 2);
  return (((x * x) % modulo) * powM(k, n % 2)) % modulo;
}
int main() {
  int n;
  scanf("%d", &n);
  std::vector<long long> a(n);
  long long sum = 0;
  for (int i = 0; i < n; i++) {
    scanf("%lld", &a[i]);
    sum += a[i];
  }
  if (sum == 1) {
    cout << 0;
    return 0;
  }
  const int A = 101000;
  std::vector<long long> ank(A);
  ank[1] = (sum - 1) * invmod(sum, mod) % mod;
  long long diff = (invmod(sum, mod) - 1) % mod;
  for (int i = 2; i < min((int)sum + 1, A); i++) {
    diff = (diff + invmod(sum - i + 1, mod)) % mod;
    ank[i] = (ank[i - 1] - diff + mod) % mod;
  }
  long long ans = 0;
  for (int i = 0; i < n; i++) {
    ans += ank[a[i]];
  }
  ans = ans % mod * (sum - 1) % mod;
  cout << ans;
}
