#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int s = 0, w = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') s = s * 10 + ch - '0', ch = getchar();
  return s * w;
}
const int inf = 2e9 + 7;
double eps = 1e-6;
const int mod = 998244353;
const int N = 3e5 + 10;
const double pi = acos(-1.0);
long long power(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
    b >>= 1;
  }
  return res;
}
long long gcd(long long a, long long b) { return !b ? a : gcd(b, a % b); }
long long exgcd(long long a, long long b, long long& x, long long& y) {
  long long c;
  return !b ? (x = 1, y = 0, a)
            : (c = exgcd(b, a % b, y, x), y -= (a / b) * x, c);
}
long long INV(long long a) {
  long long x, y;
  exgcd(a, mod, x, y);
  x %= mod;
  if (x < 0) x += mod;
  return x;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  vector<long long> a(n + 1);
  for (int i = 1; i <= n; ++i) cin >> a[i];
  long long m = 0;
  for (int i = 1; i <= n; ++i) m += a[i];
  vector<long long> F(m + 1);
  F[0] = F[1] = 1;
  for (int i = 1; i <= m - 1; ++i)
    F[i + 1] =
        (m * (n - 1) % mod * power(m - i, mod - 2) % mod - (n - 2)) * F[i] %
            mod -
        i * (n - 1) % mod * power(m - i, mod - 2) % mod * (F[i - 1] + 1) % mod,
          F[i + 1] %= mod, F[i + 1] += mod, F[i + 1] %= mod;
  long long res = 0;
  for (int i = 1; i <= n; ++i) res += F[a[i]];
  res -= (F[m] + (n - 1) * F[0]);
  res %= mod;
  res += mod;
  res %= mod;
  cout << res;
}
