#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long num = 0, neg = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') neg = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    num = (num << 3) + (num << 1) + c - '0';
    c = getchar();
  }
  return num * neg;
}
const long long mod = 998244353;
long long n, a[100010], m, g[300010], f[300010], ans;
inline long long qpow(long long x, long long k) {
  long long res = 1;
  while (k) {
    if (k & 1) res = res * x % mod;
    x = x * x % mod;
    k >>= 1;
  }
  return res;
}
int main() {
  n = read();
  g[0] = n - 1;
  for (int i = 1; i <= n; i++) a[i] = read(), m += a[i];
  for (int i = 1; i <= m; i++)
    g[i] = (m * (n - 1) % mod + (n - 1) * i % mod * g[i - 1] % mod) % mod *
           qpow(m - i, mod - 2) % mod;
  f[m] = g[m];
  for (int i = m - 1; i >= 0; i--) f[i] = (f[i + 1] + g[i]) % mod;
  for (int i = 1; i <= n; i++) ans = (ans + f[a[i]]) % mod;
  ans = (ans - ((n - 1) * f[0] % mod) + mod) % mod;
  printf("%lld\n", ans * qpow(n, mod - 2) % mod);
  return 0;
}
