#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
T pow_mod(T a, U b, int mod) {
  T r = 1;
  for (; b > 0; b >>= 1) {
    if (b & 1) r = (long long)r * a % mod;
    a = (long long)a * a % mod;
  }
  return r;
}
const int mod = 998244353;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  int n;
  cin >> n;
  vector<int> v(n);
  int s = 0;
  for (auto &i : v) cin >> i, s += i;
  int in1 = pow_mod(n - 1, mod - 2, mod);
  int is = pow_mod(s, mod - 2, mod);
  vector<int> dp(s + 1), dp2(s + 1);
  for (int x = s - 1; x >= 0; --x) {
    int y = s - x;
    int a = (long long)y * is % mod * in1 % mod;
    int b = (long long)a * (n - 2) % mod;
    int c = (long long)x * is % mod;
    int d = pow_mod((1 - b - (long long)a * dp[x + 1] % mod + 2 * mod) % mod,
                    mod - 2, mod);
    if (d == 0) {
      dp2[x - 1] = 0;
      dp2[x - 1] = ((-(long long)a * dp2[x + 1] - 1) % mod + mod) % mod *
                   pow_mod(c, mod - 2, mod) % mod;
      --x;
      continue;
    }
    dp[x] = (long long)c * d % mod;
    dp2[x] = ((long long)a * dp2[x + 1] + 1) % mod * d % mod;
  }
  for (int i = 1; i < s; ++i)
    dp2[i] = ((long long)dp[i] * dp2[i - 1] + dp2[i]) % mod;
  int sum = 0;
  for (auto i : v)
    if ((sum += dp2[i]) >= mod) sum -= mod;
  cout << (sum - (long long)dp2[0] * (n - 1) % mod + mod) % mod *
              pow_mod(n, mod - 2, mod) % mod
       << "\n";
  return 0;
}
