#include <bits/stdc++.h>
using namespace std;
long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  for (; ch < '0' || ch > '9'; ch = getchar())
    if (ch == '-') f = -1;
  for (; ch >= '0' && ch <= '9'; ch = getchar()) x = x * 10 + ch - '0';
  return x * f;
}
void write(long long x) {
  if (x < 0)
    putchar('-'), write(-x);
  else {
    if (x >= 10) write(x / 10);
    putchar(x % 10 + '0');
  }
}
const long long N = 300010, mod = 998244353;
long long ppow(long long x, long long k) {
  long long ans = 1;
  while (k) {
    if (k & 1) ans = ans * x % mod;
    x = x * x % mod;
    k >>= 1;
  }
  return ans;
}
long long f[N], a[N], xi[N], vi[N], n, m, ans;
int main() {
  n = read();
  for (long long i = (1); i <= (n); ++i) a[i] = read(), m += a[i];
  xi[0] = 1;
  vi[0] = 0;
  xi[1] = 1;
  vi[1] = -n + 1;
  for (long long i = (1); i <= (m - 1); ++i) {
    xi[i + 1] = (xi[i] * (m * (n - 1) % mod - (m - i) * (n - 2) % mod) % mod -
                 xi[i - 1] * i % mod * (n - 1) % mod) %
                mod * ppow(m - i, mod - 2) % mod;
    vi[i + 1] = (vi[i] * (m * (n - 1) % mod - (m - i) * (n - 2) % mod) % mod -
                 vi[i - 1] * i % mod * (n - 1) % mod - (m * (n - 1)) % mod) %
                mod * ppow(m - i, mod - 2) % mod;
  }
  long long x = (mod - vi[m]) * ppow(xi[m], mod - 2) % mod;
  for (long long i = (0); i <= (m); ++i) f[i] = (xi[i] * x % mod + vi[i]) % mod;
  for (long long i = (1); i <= (n); ++i) ans = (ans + f[a[i]]) % mod;
  ans = (ans - f[0] * (n - 1)) % mod;
  ans = ans * ppow(n, mod - 2) % mod;
  ans = (ans + mod) % mod;
  cout << ans << endl;
}
