#include <bits/stdc++.h>
using namespace std;
const int Mod = 998244353;
int fpow(int x, int y) {
  int res = 1;
  while (y) {
    if (y & 1) res = 1ll * res * x % Mod;
    x = 1ll * x * x % Mod;
    y >>= 1;
  }
  return res;
}
const int MAX_N = 3e5 + 5;
int N = 3e5, a[MAX_N], sum, inv[MAX_N];
int A[MAX_N], B[MAX_N], f[MAX_N];
int main() {
  inv[0] = inv[1] = 1;
  for (int i = 2; i <= N; i++)
    inv[i] = Mod - 1ll * (Mod / i) * inv[Mod % i] % Mod;
  scanf("%d", &N);
  for (int i = 1; i <= N; i++) scanf("%d", a + i), sum += a[i];
  A[0] = 1, B[0] = N - 1;
  for (int m = 1; m < sum; m++) {
    int p = 1ll * inv[sum] * inv[N - 1] % Mod;
    int q = sum - m;
    int s = 1ll * m * inv[sum] % Mod;
    int r = 1 + Mod - 1ll * p * q % Mod * (N - 2) % Mod;
    r = (r - 1ll * A[m - 1] * s % Mod + Mod) % Mod;
    r = fpow(r, Mod - 2);
    A[m] = 1ll * p * q % Mod * r % Mod;
    B[m] = (1 + 1ll * B[m - 1] * s) % Mod * r % Mod;
  }
  for (int i = sum - 1; ~i; i--) f[i] = (1ll * A[i] * f[i + 1] + B[i]) % Mod;
  int ans = 0;
  for (int i = 1; i <= N; i++) ans = (ans + f[a[i]]) % Mod;
  ans = 1ll * inv[N] * (ans - 1ll * (N - 1) * f[0] % Mod + Mod) % Mod;
  printf("%d\n", ans);
  return 0;
}
