#include <bits/stdc++.h>
template <class T>
inline T read() {
  T r = 0, f = 0;
  char c;
  while (!isdigit(c = getchar())) f |= (c == '-');
  while (isdigit(c)) r = (r << 1) + (r << 3) + (c ^ 48), c = getchar();
  return f ? -r : r;
}
inline long long qpow(long long a, int b) {
  long long ans = 1;
  for (; b; b >>= 1) {
    if (b & 1) (ans *= a) %= 1000000007;
    (a *= a) %= 1000000007;
  }
  return ans;
}
template <class T>
inline T max(T a, T b) {
  return a > b ? a : b;
}
int n, Max, a[101101];
long long s, f[101101];
int main() {
  n = read<int>();
  for (int i = 1; i <= n; i++) {
    a[i] = read<int>();
    Max = max(Max, a[i]);
    s += a[i];
  }
  long long sum = 0;
  for (int i = 1; i <= Max; i++) {
    (sum += qpow((s - i + 1) % 1000000007, 1000000007 - 2)) %= 1000000007;
    f[i] = (1000000007 - (s - 1) * i % 1000000007 +
            (s - 1) * (s - i) % 1000000007 * sum + i) %
           1000000007;
  }
  long long bg = 0;
  for (int i = 1; i <= n; i++) (bg += f[a[i]]) %= 1000000007;
  printf("%lld\n", (bg + s * (s - 2)) % 1000000007);
  return 0;
}
