#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
int n, m, k, t;
long long a[1000005], ak[1000005], invn, invm, ans;
char c[1000005];
long long pw(long long x, long long y) {
  long long ans = 1;
  while (y) {
    if (y & 1) ans *= x, ans %= mod;
    x *= x, x %= mod;
    y >>= 1;
  }
  return ans;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &a[i]);
    m += a[i];
  }
  invn = pw(n - 1, mod - 2), invm = pw(m, mod - 2);
  for (int i = m; i >= 1; i--) {
    long long k1 = i * invm % mod * invn % mod, k2 = (m - i) * invm % mod;
    ak[i] = (k2 * ak[i + 1] + 1) % mod * pw(k1, mod - 2) % mod;
  }
  for (int i = 1; i <= m; i++) ak[i] += ak[i - 1], ak[i] %= mod;
  for (int i = 1; i <= n; i++) ans += ak[m - a[i]], ans %= mod;
  ans = (ans + mod - ak[m] * (n - 1) % mod) % mod;
  printf("%lld\n", ans * pw(n, mod - 2) % mod);
  return 0;
}
