#include <bits/stdc++.h>
using namespace std;
inline int read() {
  register int x = 0, f = 1;
  register char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') x = x * 10 + (ch ^ 48), ch = getchar();
  return x * f;
}
const int P = 998244353;
const int N = 1e7 + 5;
long long fsp(long long x, int y = P - 2) {
  long long ans = 1;
  while (y) {
    if (y & 1) ans = ans * x % P;
    x = x * x % P, y >>= 1;
  }
  return ans;
}
long long inv[N];
int n, m, a[N], b[N], f[N];
void Add(int &x, int y) {
  x += y;
  if (x < 0) x += P;
  if (x >= P) x -= P;
}
int main() {
  n = read();
  for (int i = 1; i <= n; i++) a[i] = read(), m += a[i];
  b[n] = m;
  inv[1] = 1;
  for (int i = 2; i <= m; i++) inv[i] = (P - P / i) * inv[P % i] % P;
  long long im = fsp(m), in = fsp(n - 1);
  for (int i = 1; i < m; i++) {
    long long inv1 = inv[m - i] * m % P * (n - 1) % P;
    long long inv2 = (1 - im * in % P * (m - i) % P * (n - 2) % P + P) % P;
    f[i + 1] =
        inv1 * (inv2 * f[i] % P - i * im % P * (f[i - 1] + 1) % P + P) % P;
  }
  int ans = 0;
  for (int i = 1; i <= n; i++) Add(ans, f[a[i]]);
  for (int i = 1; i <= n; i++) Add(ans, P - f[b[i]]);
  printf("%d\n", ans);
  return 0;
}
