#include <bits/stdc++.h>
using namespace std;
const int maxn = 100010, MLY = 1000000007;
int f[maxn], n, a[maxn], s, ans;
inline int power(int a, int b) {
  int ans = 1;
  while (b) {
    if (b & 1) ans = 1ll * ans * a % MLY;
    a = 1ll * a * a % MLY;
    b >>= 1;
  }
  return ans;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]), s += a[i];
  f[1] = (s - 1ll) * (s - 1) % MLY * power(s, MLY - 2) % MLY;
  f[2] = (2ll * f[1] - 1 + MLY) % MLY;
  for (int i = 2; i < 100000; ++i)
    f[i + 1] =
        ((2ll * f[i] - f[i - 1] - (s - 1ll) * power(s - i, MLY - 2)) % MLY +
         MLY) %
        MLY;
  for (int i = 1; i <= n; ++i) ans = (ans + f[a[i]]) % MLY;
  printf("%d", ans);
  return 0;
}
