#include <bits/stdc++.h>
using namespace std;
const int N = 300005;
const int MOD = 998244353;
int n;
long long a[N], f[N], sum[N], s;
long long ksm(long long x, long long y) {
  x %= MOD;
  long long ans = 1;
  while (y) {
    if (y & 1) ans = ans * x % MOD;
    x = x * x % MOD;
    y >>= 1;
  }
  return ans;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%lld", &a[i]), s += a[i];
  f[0] = n - 1;
  for (int i = 1; i < s; i++) {
    f[i] = f[i - 1] * i % MOD * ksm(s, MOD - 2) % MOD + 1;
    f[i] = s * (n - 1) % MOD * ksm(s - i, MOD - 2) % MOD * f[i] % MOD;
  }
  for (int i = s; i >= 0; i--) sum[i] = (sum[i + 1] + f[i]) % MOD;
  long long ans = 0;
  for (int i = 1; i <= n; i++) (ans += sum[a[i]]) %= MOD;
  (ans += MOD - sum[0] * (n - 1) % MOD) %= MOD;
  ans = ans * ksm(n, MOD - 2) % MOD;
  printf("%lld\n", ans);
  return 0;
}
