#include <bits/stdc++.h>
inline int rint() {
  int x = 0, f = 1, s = getchar();
  for (; s < '0' || '9' < s; s = getchar()) f = s == '-' ? -f : f;
  for (; '0' <= s && s <= '9'; s = getchar()) x = x * 10 + (s ^ '0');
  return x * f;
}
template <typename Tp>
inline void wint(Tp x) {
  if (x < 0) putchar('-'), x = -x;
  if (9 < x) wint(x / 10);
  putchar(x % 10 ^ '0');
}
const int MAXN = 1e5, MAXS = 3e5, MOD = 998244353;
int n, s, a[MAXN + 5], f[MAXS + 5], inv[MAXS + 5];
inline int mul(const long long a, const int b) { return a * b % MOD; }
inline int sub(int a, const int b) { return (a -= b) < 0 ? a + MOD : a; }
inline int add(int a, const int b) { return (a += b) < MOD ? a : a - MOD; }
inline int mpow(int a, int b) {
  int ret = 1;
  for (; b; a = mul(a, a), b >>= 1) ret = mul(ret, b & 1 ? a : 1);
  return ret;
}
inline void init(const int n) {
  inv[1] = 1;
  for (int i = 2, repEndi = n; i <= repEndi; ++i)
    inv[i] = mul(MOD - MOD / i, inv[MOD % i]);
}
int main() {
  n = rint();
  for (int i = 1, repEndi = n; i <= repEndi; ++i) s += a[i] = rint();
  init(s), f[0] = n - 1;
  for (int i = 1, repEndi = s - 1; i <= repEndi; ++i) {
    f[i] = mul(inv[s - i], add(mul(s, n - 1), mul(mul(i, n - 1), f[i - 1])));
  }
  for (int i = s - 1, repEndi = 0; i >= repEndi; --i)
    f[i] = add(f[i], f[i + 1]);
  int ans = 0;
  for (int i = 1, repEndi = n; i <= repEndi; ++i) ans = add(ans, f[a[i]]);
  ans = sub(ans, mul(n - 1, f[0]));
  ans = mul(ans, mpow(n, MOD - 2));
  wint(ans), putchar('\n');
  return 0;
}
