#include <bits/stdc++.h>
template <class T>
inline T read() {
  T r = 0, f = 0;
  char c;
  while (!isdigit(c = getchar())) f |= (c == '-');
  while (isdigit(c)) r = (r << 1) + (r << 3) + (c ^ 48), c = getchar();
  return f ? -r : r;
}
inline long long qpow(long long a, int b) {
  long long ans = 1;
  for (; b; b >>= 1) {
    if (b & 1) (ans *= a) %= 998244353;
    (a *= a) %= 998244353;
  }
  return ans;
}
int n, a[303303];
long long s, f[303303];
int main() {
  n = read<int>();
  for (int i = 1; i <= n; i++) {
    a[i] = read<int>();
    s += a[i];
  }
  for (int i = 1; i < s; i++) {
    long long inv = qpow(s - i, 998244353 - 2);
    f[i + 1] = ((1ll * n * i + s - 2 * i) % 998244353 * f[i] + 998244353 -
                1ll * i * (n - 1) % 998244353 * (f[i - 1] + 1) % 998244353) %
               998244353 * inv % 998244353;
  }
  long long bg = 0;
  for (int i = 1; i <= n; i++) bg += f[a[i]];
  printf("%lld\n", (bg + 998244353 - f[s]) % 998244353);
  return 0;
}
