#include <bits/stdc++.h>
using namespace std;
const int N = 300010, mod = 998244353;
int f[N], n;
int a[N], sum = 0;
int qp(int x, int k) {
  int res = 1;
  for (; k; k >>= 1, x = 1ll * x * x % mod)
    if (k & 1) res = 1ll * x * res % mod;
  return res;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]), sum += a[i];
  f[0] = n - 1;
  for (int i = 1; i < sum; i++)
    f[i] = 1ll * (n - 1) * qp(sum - i, mod - 2) % mod *
           (1ll * i * f[i - 1] % mod + sum + mod) % mod;
  for (int i = sum - 2; i >= 0; i--) f[i] = (f[i + 1] + f[i]) % mod;
  int s = 0;
  for (int i = 1; i <= n; i++) s = (s + f[a[i]]) % mod;
  printf("%lld\n",
         (s - 1ll * (n - 1) * f[0] % mod + mod) % mod * qp(n, mod - 2) % mod);
  return 0;
}
