#include <bits/stdc++.h>
using namespace std;
const int maxn = 311111, mod = 998244353;
int add(int x, int y) {
  x += y;
  return x >= mod ? x - mod : x;
}
int mul(int x, int y) { return 1ll * x * y % mod; }
int qpow(int a, int b) {
  int ans = 1;
  while (b) {
    if (b & 1) ans = mul(ans, a);
    a = mul(a, a);
    b >>= 1;
  }
  return ans;
}
int n, r;
int a[maxn], f[maxn];
long long m;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i], m += a[i];
  for (int i = m; i; i--)
    f[i] =
        mul(add(mul(f[i + 1], mul(m - i, qpow(m, mod - 2))), 1),
            qpow(mul(i, mul(qpow(m, mod - 2), qpow(n - 1, mod - 2))), mod - 2));
  for (int i = 1; i <= m; i++) f[i] = add(f[i], f[i - 1]);
  for (int i = 1; i <= n; i++) r = add(r, f[m - a[i]]);
  cout << mul(qpow(n, mod - 2), add(r, mod - mul(n - 1, f[m])));
  return 0;
}
