#include <bits/stdc++.h>
using namespace std;
const int MAXN = 300005;
const long long MOD = 998244353;
int n, m;
int a[MAXN];
long long ans;
long long f[MAXN];
long long fac[MAXN];
long long inv[MAXN];
long long power(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) (res *= a) %= MOD;
    (a *= a) %= MOD;
    b >>= 1;
  }
  return res;
}
long long Inv(int v) { return fac[v - 1] * inv[v] % MOD; }
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    m += a[i];
  }
  fac[0] = 1;
  for (int i = 1; i <= max(n, m); i++) fac[i] = fac[i - 1] * i % MOD;
  inv[max(n, m)] = power(fac[max(n, m)], MOD - 2);
  for (int i = max(n, m); i >= 1; i--) inv[i - 1] = inv[i] * i % MOD;
  long long val1 = (n - 2) * Inv(n - 1) % MOD, val2 = (val1 + Inv(n - 1)) % MOD;
  f[0] = val2 * power(1 - val1, MOD - 2) % MOD;
  for (int i = 1; i < m; i++) {
    long long c =
        (long long)(m - i) * (n - 2) % MOD * Inv(m) % MOD * Inv(n - 1) % MOD;
    val1 = (c + i * Inv(m)) % MOD;
    val2 = (c + (m - i) * Inv(m) % MOD * Inv(n - 1) +
            i * Inv(m) % MOD * (f[i - 1] + 1)) %
           MOD;
    f[i] = val2 * power(1 - val1, MOD - 2) % MOD;
  }
  for (int i = m - 2; i >= 0; i--) (f[i] += f[i + 1]) %= MOD;
  long long ans = 0;
  for (int i = 1; i <= n; i++) (ans += f[a[i]]) %= MOD;
  (ans -= f[0] * (n - 1)) %= MOD;
  (ans *= power(n, MOD - 2)) %= MOD;
  printf("%lld\n", (ans + MOD) % MOD);
  return 0;
}
