#include <bits/stdc++.h>
using namespace std;
const long long p = 998244353;
long long n, m;
long long a[100005], f[300005];
long long poww(long long a, long long b) {
  long long f = 1;
  while (b) {
    if (b & 1) f = 1ll * f * a % p;
    b >>= 1;
    a = 1ll * a * a % p;
  }
  return f;
}
signed main() {
  cin >> n;
  for (long long i = 1; i <= n; ++i) cin >> a[i], m += a[i];
  long long invm = poww(m, p - 2), invn1 = poww(n - 1, p - 2);
  for (long long i = m; i >= 1; --i) {
    long long k1 = i * invm % p * invn1 % p, k2 = (m - i) * invm % p;
    f[i] = (k2 * f[i + 1] + 1) % p * poww(k1, p - 2) % p;
  }
  for (long long i = 1; i <= m; i++) f[i] = (f[i] + f[i - 1]) % p;
  long long res = 0;
  for (long long i = 1; i <= n; i++) res = (res + f[m - a[i]]) % p;
  res = (res + p - f[m] * (n - 1) % p) % p;
  printf("%lld\n", res * poww(n, p - 2) % p);
}
