#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
int n, t[10000005], sum, h0;
int a[10000005], b[10000005], inv[10000005];
const int Mxdt = 1000000;
inline char gc() {
  static char buf[Mxdt], *p1 = buf, *p2 = buf;
  return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, Mxdt, stdin), p1 == p2)
             ? EOF
             : *p1++;
}
inline int read() {
  int res = 0, bj = 0;
  char ch = gc();
  while (ch < '0' || ch > '9') bj |= (ch == '-'), ch = gc();
  while (ch >= '0' && ch <= '9')
    res = (res << 3) + (res << 1) + (ch ^ 48), ch = gc();
  return bj ? -res : res;
}
void Geth(int n, int m) {
  int aa, bb, cc, dd;
  a[1] = 1, b[1] = mod - n + 1, a[0] = 1, b[0] = 0;
  for (int i = 2; i <= m || i <= n; ++i)
    inv[i] = 1ll * (mod - mod / i) * inv[mod % i] % mod;
  int x = 1ll * m * (n - 1) % mod,
      y = 1ll * inv[m] % mod * (n - 2) % mod * inv[n - 1] % mod;
  for (int i = 1; i < m; ++i) {
    aa = 1ll * x * inv[m - i] % mod, bb = 1ll * (m - i) * y % mod,
    cc = 1ll * i * inv[m] % mod, dd = 1;
    a[i + 1] = ((a[i] * (1ll - bb + mod) - 1ll * cc * a[i - 1]) % mod + mod) *
               aa % mod;
    b[i + 1] =
        ((b[i] * (1ll - bb + mod) - 1ll * cc * b[i - 1] - dd) % mod + mod) *
        aa % mod;
  }
  h0 = mod - b[m];
}
int main() {
  n = read(), inv[0] = inv[1] = 1;
  for (int i = 1; i <= n; ++i) sum += (t[i] = read());
  Geth(n, sum);
  int ans = 0;
  for (int i = 1; i <= n; ++i) ans = (ans + 1ll * a[t[i]] * h0 + b[t[i]]) % mod;
  cout << 1ll * inv[n] * (ans - (n - 1ll) * h0 % mod + mod) % mod;
  return 0;
}
