#include <bits/stdc++.h>
inline void chkmax(int& a, int b) {
  if (a < b) a = b;
}
const int mod = 1e9 + 7;
inline int fpow(int x, int k) {
  int res = 1;
  for (; k; k >>= 1, x = (long long)x * x % mod) {
    if (k & 1) res = (long long)res * x % mod;
  }
  return res;
}
const int N = 1e5 + 5;
int n, a[N], sum, max_a, f[N], ans;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
    sum += a[i];
    chkmax(max_a, a[i]);
  }
  f[1] = (long long)(sum - 1) * (sum - 1) % mod * fpow(sum, mod - 2) % mod;
  f[2] = ((long long)2 * f[1] % mod + mod - 1) % mod;
  for (int i = 3; i <= max_a; ++i) {
    f[i] = ((long long)2 * f[i - 1] % mod + mod - f[i - 2] + mod -
            (long long)(sum - 1) * fpow(sum - i + 1, mod - 2) % mod) %
           mod;
  }
  for (int i = 1; i <= n; ++i) ans = (ans + f[a[i]]) % mod;
  printf("%d\n", ans);
  return 0;
}
