#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void read(T &x) {
  x = 0;
  char c = getchar();
  int f = 1;
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = x * 10 + c - '0';
    c = getchar();
  }
  x *= f;
}
template <class T>
T gcd(T a, T b) {
  return !b ? a : gcd(b, a % b);
}
template <class T>
inline void umin(T &x, T y) {
  x = x < y ? x : y;
}
template <class T>
inline void umax(T &x, T y) {
  x = x > y ? x : y;
}
inline unsigned int R() {
  static unsigned int seed = 416;
  return seed ^= seed >> 5, seed ^= seed << 17, seed ^= seed >> 13;
}
const int N = 366666, mo = 998244353, inv2 = (mo + 1) / 2;
const long long MOD = 7LL * mo * mo;
inline void add(int &x, int y) { x = x + y < mo ? x + y : x + y - mo; }
inline void sub(int &x, int y) { x = x - y >= 0 ? x - y : x - y + mo; }
inline int power(int a, int n) {
  int res = 1;
  while (n) {
    if (n & 1) res = 1LL * res * a % mo;
    a = 1LL * a * a % mo;
    n >>= 1;
  }
  return res;
}
int n, m, a[N], f[N], res;
pair<int, int> dp[N];
pair<int, int> operator+(pair<int, int> a, pair<int, int> b) {
  return make_pair((a.first + b.first) % mo, (a.second + b.second) % mo);
}
pair<int, int> operator-(pair<int, int> a, pair<int, int> b) {
  return make_pair((a.first - b.first + mo) % mo,
                   (a.second - b.second + mo) % mo);
}
pair<int, int> operator*(pair<int, int> a, int b) {
  return make_pair((1ll * a.first * b) % mo, (1ll * a.second * b) % mo);
}
int main() {
  read(n);
  for (register int i = (1); i <= (n); i++) read(a[i]), m += a[i];
  dp[m - 1] = make_pair(1, 0);
  int x = 0;
  for (register int i = (m - 1); i >= (0); i--) {
    pair<int, int> tmp = dp[i] - make_pair(0, 1) -
                         (dp[i + 1] * power(n - 1, mo - 2) +
                          dp[i] * (1 - power(n - 1, mo - 2) + mo)) *
                             (1ll * (m - i) * power(m, mo - 2) % mo);
    if (i)
      dp[i - 1] = tmp * (1ll * m * power(i, mo - 2) % mo);
    else
      x = 1ll * (mo - tmp.second) * power(tmp.first, mo - 2) % mo;
  }
  for (register int i = (0); i <= (m - 1); i++)
    f[i] = (1ll * x * dp[i].first + dp[i].second) % mo;
  res = 1ll * f[0] * (1 - n + mo) % mo;
  for (register int i = (1); i <= (n); i++) add(res, f[a[i]]);
  res = 1ll * res * power(n, mo - 2) % mo;
  cout << res;
  return 0;
}
