#include <bits/stdc++.h>
int read() {
  int r = 0, t = 1, c = getchar();
  while (c < '0' || c > '9') {
    t = c == '-' ? -1 : 1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    r = r * 10 + c - 48;
    c = getchar();
  }
  return r * t;
}
const int N = 300010, mod = 998244353;
long long power(long long a, long long b, long long p) {
  long long r = 1;
  for (; b; b >>= 1, a = a * a % p)
    if (b & 1) r = r * a % p;
  return r;
}
long long inv(long long a) { return power(a % mod + mod, mod - 2, mod); }
long long n, f[N], m, a[N], ans, A[N], B[N];
int main() {
  n = read();
  for (int i = (1), end_i = (n); i <= end_i; i++) m += (a[i] = read());
  for (int i = (0), end_i = (m - 1); i <= end_i; i++) {
    long long I =
        inv(m + n * i - 2 * i - i * (n - 1) % mod * (i ? A[i - 1] : 0));
    A[i] = (m - i) * I % mod;
    B[i] = ((n - 1) * m % mod + i * (n - 1) % mod * (i ? B[i - 1] : 0) % mod) *
           I % mod;
  }
  for (int i = (m - 1), end_i = (0); i >= end_i; i--)
    f[i] = (f[i + 1] * A[i] + B[i]) % mod;
  ans = (mod + 1 - n) * f[0] % mod;
  for (int i = (1), end_i = (n); i <= end_i; i++)
    ans = (ans + f[a[i]] + mod) % mod;
  ans = ans * inv(n) % mod;
  printf("%d\n", (int)ans);
  return 0;
}
