#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 7, M = (1 << 19), mod = 998244353, G = 3,
          iG = (mod + 1) / G, inv2 = (mod + 1) / 2;
int qpow(int first, int second = mod - 2) {
  int res = 1;
  for (; second; first = (long long)first * first % mod, second >>= 1)
    if (second & 1) res = (long long)res * first % mod;
  return res;
}
int n, s, f[N], a[N], inv[N], ns;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 1, iE = n; i <= iE; i++) cin >> a[i], (s += a[i]) %= mod;
  inv[1] = 1;
  for (int i = 2, iE = s; i <= iE; i++)
    inv[i] = (long long)inv[mod % i] * (mod - mod / i) % mod;
  for (int i = 1, iE = s - 1; i <= iE; i++)
    f[i + 1] = (long long)(f[i] + mod - 1) * i % mod * (n - 1) % mod *
               inv[s - i] % mod;
  for (int i = 1, iE = s; i <= iE; i++) (f[i] += f[i - 1]) %= mod;
  for (int i = 1, iE = n; i <= iE; i++) (ns += f[a[i]]) %= mod;
  (ns += mod - f[s]) %= mod;
  cout << ns << "\n";
  return 0;
}
