#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 300000 + 5;
const int P = 998244353;
int n, m, a[MAX_N], inv[MAX_N], f[MAX_N], ans;
int main() {
  scanf("%d", &n);
  for (int i = inv[1] = 1; i <= n; i++) {
    scanf("%d", a + i);
    m += a[i];
  }
  for (int i = 2; i <= m; i++) inv[i] = 1ll * (P - P / i) * inv[P % i] % P;
  for (int i = 1; i < m; i++)
    f[i + 1] =
        (((n - 1ll) * m % P * inv[m - i] - n + 2 + P) % P * f[i] -
         (n - 1ll) * i % P * inv[m - i] % P * (f[i - 1] + 1ll) + 1ll * P * P) %
        P;
  ans = P - f[m];
  for (int i = 1; i <= n; i++)
    if ((ans += f[a[i]]) >= P) ans -= P;
  printf("%d\n", ans);
  return 0;
}
