#include <bits/stdc++.h>
using namespace std;
inline int max(int x, int y) { return x > y ? x : y; }
inline int min(int x, int y) { return x < y ? x : y; }
inline int gcd(int n, int m) { return m ? gcd(m, n % m) : n; }
inline int lcm(int x, int y) { return x / gcd(x, y) * y; }
inline void swap(int &x, int &y) {
  int t = x;
  x = y;
  y = t;
  return;
}
int mod = 998244353;
inline int add(int x, int y) { return x + y >= mod ? x + y - mod : x + y; }
inline int del(int x, int y) { return x - y < 0 ? x - y + mod : x - y; }
inline int mul(int x, int y) { return 1ll * x * y - 1ll * x * y / mod * mod; }
inline void ckadd(int &x, int y) {
  x = x + y >= mod ? x + y - mod : x + y;
  return;
}
inline void ckdel(int &x, int y) {
  x = x - y < 0 ? x - y + mod : x - y;
  return;
}
inline void ckmul(int &x, int y) {
  x = 1ll * x * y - 1ll * x * y / mod * mod;
  return;
}
inline int ksm(int x, int y) {
  int res = 1;
  for (; y; y >>= 1, x = mul(x, x))
    if (y & 1) res = mul(res, x);
  return res;
}
namespace yspm {
inline int read() {
  int res = 0, f = 1;
  char k;
  while (!isdigit(k = getchar()))
    if (k == '-') f = -1;
  while (isdigit(k)) res = res * 10 + k - '0', k = getchar();
  return res * f;
}
inline void print(int x) {
  char s[100];
  int cnt = 0;
  while (x) s[++cnt] = x % 10, x /= 10;
  for (register int i = cnt; i <= 1; ++i) putchar(s[i] + '0');
  putchar(' ');
  return;
}
const int N = 3e5 + 10;
int sum = 0, n, a[N], f[N], g[N], fac[N], inv[N], ifac[N];
signed main() {
  n = read();
  for (register int i = 1; i <= n; ++i) sum += (a[i] = read());
  inv[0] = inv[1] = ifac[0] = ifac[1] = fac[0] = fac[1] = 1;
  for (register int i = 2; i <= N - 1; ++i)
    fac[i] = mul(fac[i - 1], i), inv[i] = mod - mul(mod / i, inv[mod % i]),
    ifac[i] = mul(ifac[i], inv[i]);
  g[0] = n - 1;
  for (register int i = 1; i <= sum; ++i)
    g[i] =
        mul(inv[sum - i], add(mul(sum, n - 1), mul(i, mul(n - 1, g[i - 1]))));
  g[sum] = 0;
  for (register int i = sum; i >= 0; --i) f[i] = add(f[i + 1], g[i]);
  int ans = 0;
  for (register int i = 1; i <= n; ++i) ans = add(ans, f[a[i]]);
  ans = mul(inv[n], del(ans, mul(n - 1, f[0])));
  cout << ans << endl;
  return 0;
}
}  // namespace yspm
signed main() { return yspm::main(); }
