#include <bits/stdc++.h>
using namespace std;
inline char gc() {
  static char buf[100000], *p1 = buf, *p2 = buf;
  return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 100000, stdin), p1 == p2)
             ? EOF
             : *p1++;
}
inline long long read() {
  long long x = 0;
  char ch = getchar();
  bool positive = 1;
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') positive = 0;
  for (; isdigit(ch); ch = getchar()) x = x * 10 + ch - '0';
  return positive ? x : -x;
}
inline void write(long long a) {
  if (a < 0) {
    a = -a;
    putchar('-');
  }
  if (a >= 10) write(a / 10);
  putchar('0' + a % 10);
}
inline void writeln(long long a) {
  write(a);
  puts("");
}
inline void wri(long long a) {
  write(a);
  putchar(' ');
}
inline unsigned long long rnd() {
  return ((unsigned long long)rand() << 30 ^ rand()) << 4 | rand() % 4;
}
const int N = 300005, mod = 998244353;
pair<long long, long long> f[N];
long long dp[N];
int a[N], n, sum;
long long ksm(long long a, int b) {
  int ans = 1;
  for (; b; b >>= 1) {
    if (b & 1) ans = ans * a % mod;
    a = a * a % mod;
  }
  return ans;
}
pair<long long, long long> operator*(long long k,
                                     pair<long long, long long> a) {
  return make_pair(a.first * k % mod, a.second * k % mod);
}
pair<long long, long long> operator+(pair<long long, long long> a,
                                     pair<long long, long long> b) {
  return make_pair(a.first + b.first, a.second + b.second);
}
void ycl() {
  f[sum - 1] = make_pair(1, 0);
  long long a = ksm(sum, mod - 2), b = ksm(n - 1, mod - 2);
  for (int i = (int)(sum - 1); i >= (int)(1); i--) {
    f[i - 1] =
        -ksm(i, mod - 2) * sum % mod *
        ((sum - i) * a % mod * b % mod * f[i + 1] +
         ((sum - i) * a % mod * (1 - b) % mod - 1) * f[i] + make_pair(0, 1));
  }
  pair<long long, long long> c =
      b * f[1] + (n - 2) * b % mod * f[0] + make_pair(0, 1);
  long long X = (c.second - f[0].second) % mod *
                ksm((f[0].first - c.first) % mod, mod - 2) % mod;
  for (int i = (int)(0); i <= (int)(sum); i++)
    dp[i] = (f[i].first * X + f[i].second) % mod;
}
int main() {
  n = read();
  for (int i = (int)(1); i <= (int)(n); i++) sum += (a[i] = read());
  ycl();
  long long ans = 0;
  for (int i = (int)(1); i <= (int)(n); i++) ans += dp[a[i]];
  ans = ((ans - (n - 1) * dp[0]) % mod + mod) % mod;
  cout << ans * ksm(n, mod - 2) % mod << endl;
}
