#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = -1;
  for (; isdigit(c); c = getchar()) x = x * 10 + c - '0';
  return x * f;
}
const int MAXN = 300010;
const int INF = 2147483600;
const long long Mod = 998244353LL;
long long A[MAXN + 1], B[MAXN + 1];
long long N;
inline long long Pow(long long a, long long b) {
  long long ret = 1;
  for (; b; b >>= 1, a = a * a % Mod)
    if (b & 1) ret = ret * a % Mod;
  return ret;
}
inline long long INV(long long x) {
  x = (x % Mod + Mod) % Mod;
  return Pow(x, Mod - 2);
}
long long a, b, c;
long long s[MAXN + 1], F[MAXN + 1];
long long ivn, ivN1, ivn2;
long long n;
inline void calc(long long i) {
  a = ivn * i % Mod;
  b = ivn * (n - i) % Mod * ivN1 % Mod;
  c = ivn * (n - i) % Mod * ivN1 % Mod * (N - 2) % Mod;
}
int main() {
  N = read();
  for (int i = 1; i <= N; i++) s[i] = read(), n += s[i];
  ivn = INV(n);
  ivN1 = INV(N - 1);
  calc(0);
  A[1] = 1;
  B[1] = 0;
  A[0] = b * (B[0] = INV(1 - c)) % Mod;
  for (int i = 1; i < n; i++) {
    calc(i);
    long long iv = INV(b);
    A[i + 1] =
        ((1 - c) * A[i] % Mod - a * A[i - 1] % Mod + Mod) % Mod * iv % Mod;
    B[i + 1] =
        ((1 - c) * B[i] % Mod - a * B[i - 1] % Mod - 1 + Mod) % Mod * iv % Mod;
  }
  long long X = (Mod - B[n]) * INV(A[n]) % Mod;
  long long ans = 0;
  for (int i = 0; i <= n; i++) F[i] = (A[i] * X % Mod + B[i]) % Mod;
  for (int i = 1; i <= N; i++) ans += F[s[i]];
  ans -= (N - 1) * F[0];
  ans = (ans % Mod + Mod) % Mod;
  printf("%lld\n", ans * INV(N) % Mod);
  return 0;
}
