#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = (x << 1) + (x << 3) + (c ^ 48);
    c = getchar();
  }
  return f == 1 ? x : -x;
}
const int N = 3e5 + 4, mod = 998244353;
inline int ksm(int x, int r) {
  int ret = 1;
  for (int i = 0; (1ll << i) <= r; i++) {
    if ((r >> i) & 1) ret = (long long)ret * x % mod;
    x = (long long)x * x % mod;
  }
  return ret;
}
int n, m, ans, a[N], pk[N], pb[N], f[N];
int main() {
  n = read();
  for (int i = 1; i <= n; i++) {
    a[i] = read();
    m += a[i];
  }
  f[0] = n - 1;
  for (int i = 1; i < m; i++) {
    f[i] = ((long long)m * (n - 1) + (long long)i * (n - 1) % mod * f[i - 1]) %
           mod * ksm(m - i, mod - 2) % mod;
  }
  for (int i = m - 1; i >= 0; i--) f[i] = (f[i + 1] + f[i]) % mod;
  for (int i = 0; i <= m; i++) cerr << f[i] << " ";
  puts("");
  for (int i = 1; i <= n; i++) {
    ans = (ans + f[a[i]]) % mod;
  }
  ans = (ans - (long long)(n - 1) * f[0] % mod + mod) % mod;
  cout << (long long)ans * ksm(n, mod - 2) % mod;
  return (0 - 0);
}
