#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline T read(register T& t) {
  register T f = 1;
  register char ch = getchar();
  t = 0;
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -f;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') t = t * 10 + ch - '0', ch = getchar();
  t *= f;
  return t;
}
template <typename T, typename... Args>
inline void read(T& t, Args&... args) {
  read(t);
  read(args...);
}
const long long p = 998244353;
inline long long power(register long long x, register long long k = p - 2) {
  register long long re = 1;
  for (; k; k >>= 1, x = x * x % p)
    if (k & 1) re = re * x % p;
  return re;
}
long long n, m;
long long a[300005];
long long g[300005], f[300005];
long long ans;
int main() {
  read(n);
  for (int i = 1; i <= n; i++) read(a[i]), m += a[i];
  g[0] = n - 1;
  for (int i = 1; i < m; i++)
    g[i] =
        (m * (n - 1) % p + g[i - 1] * (n - 1) % p * i % p) * power(m - i) % p;
  f[m] = 0;
  for (int i = m - 1; i >= 0; i--) f[i] = (f[i + 1] + g[i]) % p;
  ans = (p - f[0] * (n - 1) % p) % p;
  for (int i = 1; i <= n; i++) ans = (ans + f[a[i]]) % p;
  printf("%lld\n", ans * power(n) % p);
  return 0;
}
