#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const double eps = 1e-8;
const int mod = 1000000007;
const double pi = acos(-1.0);
inline void gn(long long &x) {
  int sg = 1;
  char c;
  while (((c = getchar()) < '0' || c > '9') && c != '-')
    ;
  c == '-' ? (sg = -1, x = 0) : (x = c - '0');
  while ((c = getchar()) >= '0' && c <= '9') x = x * 10 + c - '0';
  x *= sg;
}
inline void gn(int &x) {
  long long t;
  gn(t);
  x = t;
}
inline void gn(unsigned long long &x) {
  long long t;
  gn(t);
  x = t;
}
long long gcd(long long a, long long b) { return a ? gcd(b % a, a) : b; }
long long powmod(long long a, long long x, long long mod) {
  long long t = 1ll;
  while (x) {
    if (x & 1) t = t * a % mod;
    a = a * a % mod;
    x >>= 1;
  }
  return t;
}
void update(pair<long long, long long> &p) {
  long long g = gcd(p.first, p.second);
  if (g < 0) g = -g;
  p.first /= g;
  p.second /= g;
}
void fk(long long &x) {
  x %= mod;
  if (x < 0) x += mod;
}
pair<long long, long long> mul(pair<long long, long long> a,
                               pair<long long, long long> b) {
  long long up = a.first * b.first;
  fk(up);
  long long down = a.second * b.second;
  fk(down);
  pair<long long, long long> ret = make_pair(up, down);
  update(ret);
  return make_pair(up, down);
}
pair<long long, long long> sub(pair<long long, long long> a,
                               pair<long long, long long> b) {
  long long down = a.second * b.second;
  fk(down);
  long long up = a.first * b.second - b.first * a.second;
  fk(up);
  pair<long long, long long> ret = make_pair(up, down);
  update(ret);
  return ret;
}
void add(pair<long long, long long> &a, pair<long long, long long> b) {
  long long down = a.second * b.second;
  long long up = a.first * b.second + b.first * a.second;
  fk(down);
  fk(up);
  a.first = up;
  a.second = down;
  update(a);
}
const int maxn = 1e5 + 5;
pair<long long, long long> f[maxn];
int cnt[maxn];
int main() {
  int mx = 0;
  int n;
  gn(n);
  if (n == 1) {
    puts("0");
    return 0;
  }
  long long tot = 0;
  for (int i = (1); i <= (n); i++) {
    gn(cnt[i]);
    tot += cnt[i];
    mx = max(mx, cnt[i]);
  }
  pair<long long, long long> two;
  two.first = 2;
  two.second = 1;
  for (int i = (1); i <= (mx + 1); i++) f[i].first = f[i].second = 1;
  f[0].first = 0;
  f[0].second = 1;
  f[1].first = 1ll * (tot - 1) * (tot - 1);
  fk(f[1].first);
  f[1].second = tot;
  update(f[1]);
  for (int i = (1); i <= (mx); i++) {
    f[i + 1] = mul(two, f[i]);
    f[i + 1] = sub(f[i + 1], f[i - 1]);
    f[i + 1] = sub(f[i + 1], make_pair(tot - 1, tot - i));
  }
  pair<long long, long long> ans = make_pair(0, 1);
  for (int i = (1); i <= (n); i++) add(ans, f[cnt[i]]);
  long long aa = ans.first * powmod(ans.second, mod - 2, mod);
  aa %= mod;
  cout << aa << endl;
  return 0;
}
