#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using uint = unsigned int;
using ull = unsigned long long;
template <typename T>
using pair2 = pair<T, T>;
using pii = pair<int, int>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll myRand(ll B) { return (ull)rng() % B; }
clock_t startTime;
double getCurrentTime() {
  return (double)(clock() - startTime) / CLOCKS_PER_SEC;
}
const ll MOD = 998244353;
ll add(ll x, ll y) {
  x += y;
  if (x >= MOD) return x - MOD;
  return x;
}
ll sub(ll x, ll y) {
  x -= y;
  if (x < 0) return x + MOD;
  return x;
}
ll mult(ll x, ll y) { return (x * y) % MOD; }
ll bin_pow(ll x, ll p) {
  if (p == 0) return 1;
  if (p & 1) return mult(x, bin_pow(x, p - 1));
  return bin_pow(mult(x, x), p / 2);
}
ll rev(ll x) { return bin_pow(x, MOD - 2); }
const int N = 300300;
ll f[N];
int n, s;
int a[N];
int main() {
  startTime = clock();
  scanf("%d", &n);
  s = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    s += a[i];
  }
  f[0] = 0;
  f[1] = mult(n - 1, rev(n));
  for (int x = 1; x < s; x++) {
    ll val = mult(s, rev(n));
    val = sub(val, mult(x, sub(f[x - 1], f[x])));
    val = mult(val, n - 1);
    val = mult(val, rev(s - x));
    f[x + 1] = add(val, f[x]);
  }
  ll ans = f[s];
  for (int i = 0; i < n; i++) ans = sub(ans, f[a[i]]);
  printf("%lld\n", ans);
  return 0;
}
