#include <bits/stdc++.h>
using namespace std;
inline int read() {
  char ch = getchar();
  int w = 1, c = 0;
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') w = -1;
  for (; isdigit(ch); ch = getchar()) c = (c << 1) + (c << 3) + (ch ^ 48);
  return w * c;
}
const int mod = 998244353, M = 3e5 + 10;
long long fast(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 n, a[M];
long long f[M];
int main() {
  n = read();
  int m = 0;
  for (int i = (1); i <= (n); ++i) a[i] = read(), m += a[i];
  f[0] = n - 1;
  for (int i = (1); i <= (m - 1); ++i) {
    f[i] = (1ll * m * (n - 1) + 1ll * i * (n - 1) % mod * f[i - 1]) % mod;
    f[i] = f[i] * fast(m - i, mod - 2) % mod;
  }
  for (int i = (m - 1); i >= (0); --i) f[i] = (f[i] + f[i + 1]) % mod;
  long long ans = mod - 1ll * (n - 1) * f[0] % mod;
  ans %= mod;
  for (int i = (1); i <= (n); ++i) ans = (ans + f[a[i]]) % mod;
  cout << ans * fast(n, mod - 2) % mod << "\n";
  return 0;
}
