#include <bits/stdc++.h>
using namespace std;
const int N = 300005, mod = 998244353;
long long qpow(long long a, long long b) {
  long long res = 1;
  for (; b; b >>= 1, a = a * a % mod)
    if (b & 1) res = res * a % mod;
  return res;
}
int n, s;
int a[N];
long long f[N];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    s += a[i];
  }
  f[0] = n - 1;
  long long invs = qpow(s, mod - 2);
  for (int i = 1; i < s; i++)
    f[i] = (1 + i * invs % mod * f[i - 1] % mod) % mod * s % mod * (n - 1) %
           mod * qpow(s - i, mod - 2) % mod;
  for (int i = s - 1; i >= 0; i--) f[i] = (f[i] + f[i + 1]) % mod;
  long long ans = 0;
  for (int i = 1; i <= n; i++) ans = (ans + f[a[i]]) % mod;
  cout << (ans - f[0] * (n - 1) % mod + mod) % mod * qpow(n, mod - 2) % mod;
  return 0;
}
