#include <bits/stdc++.h>
using namespace std;
const int maxn = 300010, P = 998244353;
int n, m, ans, a[maxn], f[maxn];
int qp(int x, int y) {
  int z = 1;
  for (; y; y >>= 1, x = 1LL * x * x % P) {
    if (y & 1) z = 1LL * z * x % P;
  }
  return z;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]), m += a[i];
  }
  int inv1 = qp(m, P - 2), inv2 = qp(n - 1, P - 2);
  for (int i = m; i; i--) {
    f[i] = (1LL * (m - i) * inv1 % P * f[i + 1] + 1) % P;
    f[i] = 1LL * f[i] * qp(1LL * i * inv1 % P * inv2 % P, P - 2) % P;
  }
  for (int i = 1; i <= m; i++) {
    (f[i] += f[i - 1]) %= P;
  }
  for (int i = 1; i <= n; i++) {
    (ans += f[m - a[i]]) %= P;
  }
  printf("%d\n", (ans - 1LL * f[m] * (n - 1) % P + P) % P * qp(n, P - 2) % P);
  return 0;
}
