#include <bits/stdc++.h>
using uint = unsigned int;
using cat = long long;
using dbl = long double;
constexpr dbl pi = 3.14159265358979323846;
using namespace std;
cat pw(cat a, cat e, cat mod) {
  if (e <= 0) return 1;
  cat x = pw(a, e / 2, mod);
  x = x * x % mod;
  return (e & 1) ? x * a % mod : x;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(10);
  int N;
  cin >> N;
  vector<int> A(N);
  int S = 0;
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    S += A[i];
  }
  if (S == 1) {
    cout << "0\n";
    return 0;
  }
  cat mod = 998244353;
  vector<cat> inv(S + 1, 1);
  for (int i = 1; i <= S; i++) inv[i] = pw(i, mod - 2, mod);
  cat iN = pw(N - 1, mod - 2, mod), iS = pw(S, mod - 2, mod);
  vector<cat> E(S + 1, 0), E_lf_c(S + 1, 0), E_lf_a(S + 1, 0);
  E_lf_a[1] = 1;
  for (int i = 1; i < S; i++) {
    cat c1 = i * iS % mod * iN % mod;
    cat c2 = 1 - i * iS % mod * (1 - iN) % mod;
    cat c3 = S * inv[S - i] % mod;
    E_lf_a[i + 1] = (c2 * E_lf_a[i] - c1 * E_lf_a[i - 1]) % mod * c3 % mod;
    E_lf_c[i + 1] = (c2 * E_lf_c[i] - c1 * E_lf_c[i - 1] - 1) % mod * c3 % mod;
  }
  E[1] = (N - 1 + E_lf_c[S - 1] - E_lf_c[S]) *
         pw(E_lf_a[S] - E_lf_a[S - 1], mod - 2, mod) % mod;
  for (int i = 2; i <= S; i++) E[i] = (E[1] * E_lf_a[i] + E_lf_c[i]) % mod;
  cat E_cyc = E[S];
  cat ans = 0;
  for (int i = 0; i < N; i++) ans += E[S - A[i]];
  ans = (ans - (N - 1) * E_cyc) % mod * pw(N, mod - 2, mod) % mod;
  if (ans < 0) ans += mod;
  cout << ans << "\n";
  return 0;
}
