#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1, 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 mod = 998244353;
inline int fix(int x) { return x + ((x >> 31) & mod); }
inline int add(int x, int y) { return fix(x + y - mod); }
inline int dec(int x, int y) { return fix(x - y); }
inline int mul(int x, int y) { return (long long)x * y % mod; }
inline void ADD(int &x, int y) { x = fix(x + y - mod); }
inline void DEC(int &x, int y) { x = fix(x - y); }
inline void MUL(int &x, int y) { x = (long long)x * y % mod; }
inline int ksm(int x, int r) {
  int ret = 1;
  for (int i = 0; (1ll << i) <= r; i++) {
    if ((r >> i) & 1) MUL(ret, x);
    MUL(x, x);
  }
  return ret;
}
inline int inv(int x) { return ksm(x, mod - 2); }
const int N = 3e5 + 4;
int n, m, ans, a[N], f[N];
int main() {
  n = read();
  for (int i = 1; i <= n; i++) {
    a[i] = read();
    m += a[i];
  }
  f[1] = dec(0, inv(m));
  for (int i = 1; i < m; i++)
    f[i + 1] = fix((((long long)i * n + m - i * 2) % mod * f[i] -
                    (long long)i * (n - 1) % mod * f[i - 1] - 1) %
                   mod * inv(m - i) % mod);
  ans = dec(0, f[m]);
  for (int i = 1; i <= n; i++) ADD(ans, f[a[i]]);
  MUL(ans, mul(mul(m, n - 1), inv(n)));
  cout << ans << "\n";
  return (0 - 0);
}
