#include <bits/stdc++.h>
using namespace std;
const int MN = 3e6 + 5, mod = 998244353;
int N, s, f[MN], g[MN], a[MN];
inline void inc(int &x, int y) { x = x + y < mod ? x + y : x + y - mod; }
inline void dec(int &x, int y) { x = x - y >= 0 ? x - y : x - y + mod; }
inline int qPow(int a, int b) {
  int c = 1;
  for (; b; b >>= 1, a = 1ll * a * a % mod)
    if (b & 1) c = 1ll * c * a % mod;
  return c;
}
int main() {
  scanf("%d", &N);
  for (int i = 1; i <= N; ++i) {
    scanf("%d", &a[i]);
    s += a[i];
  }
  g[0] = N - 1;
  for (int i = 1; i < s; ++i)
    g[i] =
        (1ll * s * (N - 1) % mod + 1ll * i * (N - 1) % mod * g[i - 1] % mod) %
        mod * qPow(s - i, mod - 2) % mod;
  for (int i = s; ~i; --i) f[i] = (f[i + 1] + g[i]) % mod;
  int ans = 0;
  for (int i = 1; i <= N; ++i) inc(ans, f[a[i]]);
  dec(ans, 1ll * f[0] * (N - 1) % mod);
  ans = 1ll * ans * qPow(N, mod - 2) % mod;
  printf("%d\n", ans);
  return 0;
}
