#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void read(T &x) {
  int f = 0;
  x = 0;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar()) f |= (ch == '-');
  for (; isdigit(ch); ch = getchar()) x = x * 10 + ch - '0';
  if (f) x = -x;
}
const int N = 100005, mod = 1e9 + 7;
int a[N], f[N], n, sum, mx, ans;
int power(int x, int p) {
  int res = 1;
  for (; p; p >>= 1, x = (long long)x * x % mod)
    if (p & 1) res = (long long)res * x % mod;
  return res;
}
int mul(int x, int y) { return (long long)x * y % mod; }
int fix(int x) { return x >= mod ? x - mod : x; }
int main() {
  read(n);
  for (int i = (1); i <= (n); i++) {
    read(a[i]);
    mx = max(mx, a[i]);
    sum += a[i];
  }
  f[1] = mul(mul(sum - 1, sum - 1), power(sum, mod - 2));
  for (int i = (1); i <= (mx - 1); i++) {
    int t = mul(sum - 1, power(sum - i, mod - 2));
    f[i + 1] = fix(fix(f[i] + f[i]) + mod - fix(f[i - 1] + t));
  }
  for (int i = (1); i <= (n); i++) ans = fix(ans + f[a[i]]);
  cout << ans << endl;
  return 0;
}
