#include <bits/stdc++.h>
using namespace std;
const long long maxn = 1e7 + 10;
const long long Mod = 998244353;
long long n, m, a[maxn], f[maxn], g[maxn];
inline long long power(long long a, long long b) {
  long long r = 1;
  while (b) {
    if (b & 1) r = r * a % Mod;
    a = a * a % Mod;
    b >>= 1;
  }
  return r;
}
inline pair<long long, long long> operator+(pair<long long, long long> a,
                                            pair<long long, long long> b) {
  return pair<long long, long long>((a.first + b.first) % Mod,
                                    (a.second + b.second) % Mod);
}
inline pair<long long, long long> operator-(pair<long long, long long> a,
                                            pair<long long, long long> b) {
  return pair<long long, long long>((a.first - b.first) % Mod,
                                    (a.second - b.second) % Mod);
}
inline pair<long long, long long> operator*(pair<long long, long long> a,
                                            long long b) {
  return pair<long long, long long>(a.first * b % Mod, a.second * b % Mod);
}
inline pair<long long, long long> operator+(pair<long long, long long> a,
                                            long long b) {
  return pair<long long, long long>(a.first, (a.second + b) % Mod);
}
inline pair<long long, long long> operator-(pair<long long, long long> a,
                                            long long b) {
  return pair<long long, long long>(a.first, (a.second - b) % Mod);
}
signed main() {
  scanf("%lld", &n);
  for (long long i = (1), _end_ = (n); i <= _end_; ++i) {
    scanf("%lld", &a[i]);
    m += a[i];
  }
  g[0] = n - 1;
  for (long long i = (1), _end_ = (m); i <= _end_; ++i) {
    long long first = (m * (n - 1) + (i * (n - 1) % Mod) * g[i - 1]) % Mod;
    g[i] = power(m - i, Mod - 2) * first % Mod;
  }
  f[m] = 0;
  for (long long i = m - 1; i >= 0; --i) f[i] = (f[i + 1] + g[i]) % Mod;
  long long ans = 0;
  for (long long i = (1), _end_ = (n); i <= _end_; ++i)
    ans = (ans + f[a[i]]) % Mod;
  ans = (ans - f[0] * (n - 1)) % Mod;
  printf("%lld\n", (ans * power(n, Mod - 2) % Mod + Mod) % Mod);
  return 0;
}
