#include <bits/stdc++.h>
using namespace std;
char read_str[1 << 25], *CH = read_str;
long long read() {
  char ch = (*CH++);
  int fl = 0;
  long long x = 0;
  while (!isdigit(ch)) {
    if (ch == '-') fl = 1;
    ch = (*CH++);
  }
  while (isdigit(ch)) x = (x << 1) + (x << 3) + ch - '0', ch = (*CH++);
  return fl ? -x : x;
}
void rstr(char *s) {
  char *x = s;
  char ch = (*CH++);
  while (ch == ' ' || ch == '\n' || ch == '\r') ch = (*CH++);
  while (ch != ' ' && ch != '\n' && ch != '\r') {
    *x++ = ch;
    ch = (*CH++);
  }
}
const int Max_n = 3e5 + 5, mod = 998244353;
int n, m, a[Max_n];
int f[Max_n];
int ksm(int a, int b = mod - 2) {
  int res = 1;
  for (; b; b >>= 1, a = (long long)a * a % mod)
    if (b & 1) res = (long long)res * a % mod;
  return res;
}
namespace Input {
void main() {
  fread(read_str, 1, 1 << 25, stdin);
  n = read();
  for (int i = 1; i <= n; i++) m += a[i] = read();
}
}  // namespace Input
namespace Solve {
void main() {
  f[0] = n - 1;
  int t = (long long)m * (n - 1) % mod;
  for (int i = 1; i < m; i++)
    f[i] =
        ((long long)i * (n - 1) % mod * f[i - 1] % mod + t) * ksm(m - i) % mod;
  for (int i = m - 1; ~i; i--) (f[i] += f[i + 1]) %= mod;
  int ans = 0;
  for (int i = 1; i <= n; i++) (ans += f[a[i]]) %= mod;
  (ans += mod - (long long)(n - 1) * f[0] % mod) %= mod;
  ans = (long long)ans * ksm(n) % mod;
  cout << ans << endl;
}
}  // namespace Solve
int main() {
  Input::main();
  Solve::main();
}
