#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 7, p = 998244353;
int n, m, w[N], f[N];
struct poly {
  int g[4];
} e[N];
inline long long pows(long long u, int v) {
  long long ans = 1;
  while (v > 0) {
    if (v & 1) ans = ans * u % p;
    u = u * u % p, v = v >> 1;
  }
  return ans;
}
inline int read() {
  int num = 0;
  char g = getchar();
  while (g < 48 || 57 < g) g = getchar();
  while (47 < g && g < 58)
    num = (num << 1) + (num << 3) + g - 48, g = getchar();
  return num;
}
int main() {
  n = read();
  int ans = 0;
  for (int i = 1; i <= n; i++) w[i] = read(), m += w[i];
  for (int i = 0; i <= m; i++) {
    e[i].g[0] = pows(m, p - 2) * i % p;
    e[i].g[1] =
        (pows(m, p - 2) * (m - i) % p * pows(n - 1, p - 2) % p * (n - 2) % p +
         p - 1) %
        p;
    e[i].g[2] = pows(m, p - 2) * (m - i) % p * pows(n - 1, p - 2) % p;
    e[i].g[3] = 1;
  }
  for (int i = 1; i < m; i++) {
    e[i].g[3] = (e[i].g[3] + e[i - 1].g[3] * pows(p - e[i - 1].g[1], p - 2) %
                                 p * e[i].g[0]) %
                p;
    e[i].g[1] = (e[i].g[1] + e[i - 1].g[2] * pows(p - e[i - 1].g[1], p - 2) %
                                 p * e[i].g[0]) %
                p;
    e[i].g[0] = 0;
  }
  for (int i = m - 1; i >= 0; i--)
    f[i] = (1ll * f[i + 1] * e[i].g[2] + e[i].g[3]) % p *
           pows(p - e[i].g[1], p - 2) % p;
  for (int i = 1; i <= n; i++) ans = (ans + f[w[i]]) % p;
  ans = (ans - pows((n - 1), 1) * f[0]) % p * pows(n, p - 2) % p;
  cout << (ans + p) % p << endl;
}
