#include <bits/stdc++.h>
using namespace std;
const int maxn = 300003;
const int mod = 998244353;
int n;
int a[maxn];
void read() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
}
int fast_pow(int x, int deg) {
  int ans = 1, y = x;
  while (deg) {
    if (deg & 1) ans = 1ll * ans * y % mod;
    deg >>= 1;
    y = 1ll * y * y % mod;
  }
  return ans;
}
int add(int a, int b) {
  a += b;
  if (a >= mod) a -= mod;
  if (a < 0) a += mod;
  return a;
}
int c1[maxn], c2[maxn];
int f[maxn];
void solve() {
  int s = 0;
  for (int i = 1; i <= n; i++) s += a[i];
  int inv_s = fast_pow(s, mod - 2), inv_n = fast_pow(n - 1, mod - 2);
  c1[0] = 1, c2[0] = 0;
  for (int i = 1; i <= s - 1; i++) {
    int t = add(1, -1ll * (s - i) * (n - 2) % mod * inv_s % mod * inv_n % mod);
    t = add(t, -1ll * i * inv_s % mod * c1[i - 1] % mod);
    t = fast_pow(t, mod - 2);
    c1[i] = 1ll * (s - i) * inv_s % mod * inv_n % mod * t % mod;
    c2[i] =
        1ll *
        add(1ll * i * inv_s % mod, 1ll * i * inv_s % mod * c2[i - 1] % mod) *
        t % mod;
  }
  f[s] = 0;
  for (int i = s - 1; i >= 0; i--)
    f[i] = add(1ll * c1[i] * f[i + 1] % mod, c2[i]);
  int ans = 0;
  for (int i = 1; i <= n; i++) ans = add(ans, f[a[i]]);
  ans = add(ans, -f[s]);
  ans = add(ans, -1ll * (n - 1) * f[0] % mod);
  cout << ans << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  read();
  solve();
}
