#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline int chkmax(T &a, T b) {
  return a < b ? a = b, 1 : 0;
}
template <typename T>
inline int chkmin(T &a, T b) {
  return a > b ? a = b, 1 : 0;
}
template <typename T>
inline T read() {
  T sum = 0, fl = 1;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') fl = -1;
  for (; isdigit(ch); ch = getchar())
    sum = (sum << 3) + (sum << 1) + (ch - '0');
  return sum * fl;
}
const int maxn = 1e5 + 5;
const int mod = 1e9 + 7;
int N;
int A[maxn];
inline int Pow(int a, int b, int ans = 1) {
  for (; b; b >>= 1, a = (long long)a * a % mod)
    if (b & 1) ans = (long long)ans * a % mod;
  return ans;
}
int F[maxn];
inline void solve() {
  int sum = 0, mx = 0;
  for (int i = 1; i <= N; ++i) sum = (sum + A[i]) % mod, chkmax(mx, A[i]);
  F[1] = (long long)(sum - 1) * (sum - 1) % mod * Pow(sum, mod - 2) % mod;
  F[2] = (2ll * F[1] + mod - 1) % mod;
  for (int i = 2; i < mx; ++i) {
    F[i + 1] = (2ll * F[i] + mod - F[i - 1] + mod -
                (long long)(sum - 1) * Pow(sum - i, mod - 2) % mod) %
               mod;
  }
  int Ans = 0;
  for (int i = 1; i <= N; ++i) Ans = (Ans + F[A[i]]) % mod;
  printf("%d\n", Ans);
}
inline void input() {
  N = read<int>();
  for (int i = 1; i <= N; ++i) A[i] = read<int>();
}
int main() {
  input();
  solve();
  return 0;
}
