#include <bits/stdc++.h>
using namespace std;
template <typename T>
bool chkmax(T &x, T y) {
  return x < y ? x = y, true : false;
}
template <typename T>
bool chkmin(T &x, T y) {
  return x > y ? x = y, true : false;
}
const int mod = 998244353;
int n, m;
const int N = 1e5 + 10;
long long a[N], ans[N * 3];
long long qpow(long long x, long long p) {
  long long ret = 1;
  for (; p; p >>= 1, x = x * x % mod)
    if (p & 1) ret = ret * x % mod;
  return ret;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]), m += a[i];
  long long invm = qpow(m, mod - 2), invn1 = qpow(n - 1, mod - 2);
  for (int i = m; i >= 1; i--) {
    long long k1 = i * invm % mod * invn1 % mod, k2 = (m - i) * invm % mod;
    ans[i] = (k2 * ans[i + 1] + 1) % mod * qpow(k1, mod - 2) % mod;
  }
  for (int i = 1; i <= m; i++) ans[i] = (ans[i] + ans[i - 1]) % mod;
  long long res = 0;
  for (int i = 1; i <= n; i++) res = (res + ans[m - a[i]]) % mod;
  res = (res + mod - ans[m] * (n - 1) % mod) % mod;
  printf("%lld\n", res * qpow(n, mod - 2) % mod);
  return 0;
}
