#include <bits/stdc++.h>
using namespace std;
const int mod(1e9 + 7);
const int maxn(1e5 + 5);
int mx = 1e5, n, cnt[maxn], sum, f[maxn], ans;
inline void Inc(int &x, int y) {
  if ((x += y) >= mod) x -= mod;
}
inline int Pow(long long x, int y) {
  register long long ret = 1;
  for (; y; y >>= 1, x = x * x % mod)
    if (y & 1) ret = ret * x % mod;
  return ret;
}
int main() {
  scanf("%d", &n);
  register int i;
  for (i = 1; i <= n; i++) scanf("%d", &cnt[i]), sum += cnt[i];
  f[1] = 1LL * (sum - 1) * (sum - 1) % mod * Pow(sum, mod - 2) % mod;
  f[2] = (2 * f[1] % mod + mod - 1) % mod;
  for (i = 2; i < mx; i++)
    f[i + 1] = ((2 * f[i] % mod - f[i - 1] + mod) % mod -
                1LL * (sum - 1) * Pow(sum - i, mod - 2) % mod + mod) %
               mod;
  for (i = 1; i <= n; i++) Inc(ans, f[cnt[i]]);
  printf("%d\n", ans);
}
