#include <bits/stdc++.h>
using namespace std;
static const long long PRIME = 998244353;
long long mod(long long n, long long m) { return (n % m + m) % m; }
long long inverse(long long n, long long p) {
  n = mod(n, p);
  long long res = 1;
  long long pow = p - 2;
  while (pow > 0) {
    if (pow & 1) {
      res = (res * n) % p;
    }
    pow = pow >> 1;
    n = (n * n) % p;
  }
  return res;
}
struct frac {
  long long r;
  frac() : r(0) {}
  frac(long long num, long long den)
      : r((mod(num, PRIME) * inverse(den, PRIME)) % PRIME) {}
  frac(long long n) : r(mod(n, PRIME)) {}
  friend frac operator*(const frac& x, const frac& y) {
    return frac(x.r * y.r);
  }
  friend frac operator-(const frac& x, const frac& y) {
    return frac(x.r - y.r);
  }
  friend frac operator+(const frac& x, const frac& y) {
    return frac(x.r + y.r);
  }
  friend frac operator/(const frac& x, const frac& y) { return frac(x.r, y.r); }
  frac operator-() const { return frac(-r); }
  frac& operator+=(const frac& rhs) {
    r = mod(r + rhs.r, PRIME);
    return *this;
  }
  frac& operator-=(const frac& rhs) {
    r = mod(r - rhs.r, PRIME);
    return *this;
  }
  frac& operator*=(const frac& rhs) {
    r = mod(r * rhs.r, PRIME);
    return *this;
  }
  frac& operator/=(const frac& rhs) {
    r = mod(r / rhs.r, PRIME);
    return *this;
  }
};
template <typename T>
struct vec3 {
  T a, b, c;
  vec3() : a(0), b(0), c(0) {}
  vec3(T x, T y, T z) : a(x), b(y), c(z) {}
  friend vec3 operator-(const vec3& x, const vec3& y) {
    return vec3(x.a - y.a, x.b - y.b, x.c - y.c);
  }
  friend vec3 operator+(const vec3& x, const vec3& y) {
    return vec3(x.a + y.a, x.b + y.b, x.c + y.c);
  }
  friend vec3 operator*(const vec3& x, const T& f) {
    return vec3(x.a * f, x.b * f, x.c * f);
  }
  friend vec3 operator*(const T& f, const vec3& x) {
    return vec3(x.a * f, x.b * f, x.c * f);
  }
  vec3 operator-() const { return vec3(-a, -b, -c); }
  vec3& operator+=(const vec3& rhs) {
    a += rhs.a;
    b += rhs.b;
    c += rhs.c;
    return *this;
  }
  vec3& operator-=(const vec3& rhs) {
    a -= rhs.a;
    b -= rhs.b;
    c -= rhs.c;
    return *this;
  }
};
int main(int argc, char const* argv[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  { scanf("%lld", &n); }
  vector<long long> list(n);
  long long m = 0;
  {
    for (long long i = 0; i < n; i++) {
      scanf("%lld", &list[i]);
      m += list[i];
    }
  }
  vector<vec3<frac>> seq(m + 1);
  {
    {
      seq[0] = vec3<frac>(1, 0, 0);
      seq[1] = vec3<frac>(0, 1, 0);
      vec3<frac> unit(0, 0, 1);
      for (long long a = 1; a <= m - 1; a++) {
        long long inv = inverse(m - a, PRIME);
        long long num1 = mod(m + a * n - 2 * a, PRIME);
        long long num2 = mod(-a * (n - 1), PRIME);
        frac c1(num1 * inv);
        frac c2(num2 * inv);
        seq[a + 1] = c1 * seq[a] + c2 * (seq[a - 1] + unit);
      }
    }
  }
  vec3<frac> add;
  for (int i = 0; i < n; i++) {
    add += seq[list[i]];
  }
  vec3<frac> sub = (n - 1) * seq[0] + seq[m];
  vec3<frac> res = add - sub;
  printf("%lld\n", res.c.r);
  return 0;
}
