#include <bits/stdc++.h>
using namespace std;
const int M = 998244353;
int power(int a, int p) {
  if (p == 0) return 1;
  int ans = power(a, p / 2);
  ans = (1LL * ans * ans) % M;
  if (p % 2) ans = (1LL * a * ans) % M;
  return ans;
}
vector<int> tridiagonal(vector<vector<int>> mat) {
  int n = mat.size();
  for (int i = 1; i < n; i++) {
    int cof = (1LL * mat[i][0] * (M - power(mat[i - 1][1], M - 2))) % M;
    mat[i][0] = (mat[i][0] + 1LL * cof * mat[i - 1][1]) % M;
    mat[i][1] = (mat[i][1] + 1LL * cof * mat[i - 1][2]) % M;
    mat[i][3] = (mat[i][3] + 1LL * cof * mat[i - 1][3]) % M;
  }
  for (int i = n - 2; i >= 0; i--) {
    int cof = (1LL * mat[i][2] * (M - power(mat[i + 1][1], M - 2))) % M;
    mat[i][2] = (mat[i][2] + 1LL * cof * mat[i + 1][1]) % M;
    mat[i][3] = (mat[i][3] + 1LL * cof * mat[i + 1][3]) % M;
  }
  vector<int> ans;
  for (int i = 0; i < n; i++) {
    assert(mat[i][0] == 0 && mat[i][2] == 0);
    int val = (1LL * mat[i][3] * power(mat[i][1], M - 2)) % M;
    ans.push_back(val);
  }
  return ans;
}
const int N = 3e5 + 7;
int a[N];
int minushalf = (M - power(2, M - 2)) % M;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, s = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    s += a[i];
  }
  vector<vector<int>> mat(s, vector<int>(4));
  int invs = power(s, M - 2);
  int invnminus1 = power(n - 1, M - 2);
  for (int i = 0; i < s; i++) {
    int pkombe = (1LL * i * invs) % M;
    int pbarbe = (1LL * (s - i) * invs) % M;
    pbarbe = (1LL * pbarbe * invnminus1) % M;
    mat[i][0] = (M - pkombe) % M;
    mat[i][1] = (pbarbe + pkombe) % M;
    if (i + 1 < s) mat[i][2] = (M - pbarbe) % M;
    mat[i][3] = 1;
  }
  vector<int> sol = tridiagonal(mat);
  sol.push_back(0);
  int C = sol[0];
  int ans = (1LL * (M - C) * (n - 1)) % M;
  for (int i = 1; i <= n; i++) {
    ans = (ans + sol[a[i]]) % M;
  }
  ans = (1LL * ans * power(n, M - 2)) % M;
  cout << ans << endl;
}
