#include <bits/stdc++.h>
using namespace std;
long long n, tot, itot, inv, ans, a[300005], dp[300005];
long long rd() {
  long long x = 0, tp = 1;
  char c;
  c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') tp = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x * 10 + c - '0');
    c = getchar();
  }
  return x * tp;
}
long long quick_mod(long long a, long long x) {
  long long res = 1;
  while (x) {
    if (x & 1) (res *= a) %= 998244353;
    (a *= a) %= 998244353, x >>= 1;
  }
  return res;
}
int main() {
  n = rd();
  for (int i = 1; i <= n; i++) a[i] = rd(), tot += a[i];
  itot = quick_mod(tot, 998244353 - 2), inv = quick_mod(n - 1, 998244353 - 2);
  for (int i = tot; i; i--) {
    long long k1 = itot * i % 998244353 * inv % 998244353,
              k2 = itot * (tot - i) % 998244353;
    dp[i] = (k2 * dp[i + 1] + 1) % 998244353 * quick_mod(k1, 998244353 - 2) %
            998244353;
  }
  for (int i = 1; i <= tot; i++) (dp[i] += dp[i - 1]) %= 998244353;
  for (int i = 1; i <= n; i++) (ans += dp[tot - a[i]]) %= 998244353;
  ans = (ans - dp[tot] * (n - 1) % 998244353 + 998244353) % 998244353;
  printf("%lld\n", ans * quick_mod(n, 998244353 - 2) % 998244353);
  return 0;
}
